]> git.localhorst.tv Git - alttp.git/blob - resources/js/components/rounds/SeedCode.js
tracker items as svg
[alttp.git] / resources / js / components / rounds / SeedCode.js
1 import PropTypes from 'prop-types';
2 import React from 'react';
3
4 import ZeldaIcon from '../common/ZeldaIcon';
5
6 const SeedCode = ({ code, game }) =>
7 <span className={`seed-code game-${game}`}>
8         {code.map(game === 'smr'
9                 ? (symbol, index) => <span key={`${symbol}.${index}`}>{symbol}</span>
10                 : (symbol, index) => <ZeldaIcon key={`${symbol}.${index}`} name={symbol} />
11         )}
12 </span>;
13
14 SeedCode.propTypes = {
15         code: PropTypes.arrayOf(PropTypes.string),
16         game: PropTypes.string,
17 };
18
19 export default SeedCode;