import * as React from 'react' ; import styles from './Icon.module.scss' ; export interface Props { name : string ; size ? : 's' | 'm' | 'l' | 'xl' ; } const Icon = props => { const { name } = props ; const size = props . size ?? 'm' ; return < span className = { `${ styles . icon } ${ styles [ `icon-${ size }` ] }` } > { name } < /span>; } ; export default Icon ;