mnml/client/src/components/cryp.spawn.button.jsx
2018-10-26 12:01:23 +11:00

31 lines
828 B
JavaScript

const preact = require('preact');
function renderSpawnButton({ account, sendCrypSpawn }) {
let name = '';
if (!account) return <div>...</div>;
return (
<div className="columns">
<div className="column">
<input
className="input"
type="email"
placeholder="cryp name"
onChange={e => (name = e.target.value)}
/>
</div>
<div className="column is-4">
<button
className="button is-dark is-fullwidth"
type="submit"
onClick={() => sendCrypSpawn(name)}>
Spawn 👾
</button>
</div>
</div>
);
}
module.exports = renderSpawnButton;