UNPKG

cassoid

Version:

Cassoid, Foundry and your guide to weapon crafting

31 lines (25 loc) 733 B
const { useSelectiveState } = require('red/state/hook'); const styles = require('./weapon.module.css'); const React, { memo } = require('react'); const { state } = require('red/state'); const { PerkWizard } = require('red'); function Weapon({ name, perks }) { const text = useSelectiveState(state.translations); return ( <section className={ styles.weapon }> <header> <h1 className={ styles.name }>{ name }</h1> <h5 className={ styles.type }>{ text[type] }</h5> <figure className={ styles.element }> </figure> </header> <PerkWizard perks={ perks } /> </section> ); } // // Expose the component. // module.exports = require('red/export')({ Stats: memo(Stats) });