import * as React from 'react'; import withIconSvg from '../helpers/withIconSvg'; export interface Props { size?: 's' | 'm'; } const Icon: React.FC = (props) => { const { size, ...restProps } = props; switch (size) { case 'm': return ( ); case 's': default: return ( ); } }; Icon.defaultProps = { size: 's', }; export default withIconSvg(Icon, true, { additionalProps: [ { propName: 'size', type: 'select', options: ['s', 'm'], // todo: how to automatically get these options??? default: Icon.defaultProps.size, }, ], tags: ['bang', 'exclamation', 'punctuation', 'warn', 'warning', 'error'], });