]> git.localhorst.tv Git - alttp.git/blobdiff - resources/js/components/rounds/SeedCode.js
display seed code
[alttp.git] / resources / js / components / rounds / SeedCode.js
diff --git a/resources/js/components/rounds/SeedCode.js b/resources/js/components/rounds/SeedCode.js
new file mode 100644 (file)
index 0000000..1539c18
--- /dev/null
@@ -0,0 +1,17 @@
+import PropTypes from 'prop-types';
+import React from 'react';
+
+import ZeldaIcon from '../common/ZeldaIcon';
+
+const SeedCode = ({ code }) =>
+<span className="seed-code">
+       {code.map((symbol, index) =>
+               <ZeldaIcon key={`${symbol}.${index}`} name={symbol} />
+       )}
+</span>;
+
+SeedCode.propTypes = {
+       code: PropTypes.arrayOf(PropTypes.string),
+};
+
+export default SeedCode;