import React from 'react'; import Examples from './utils/Examples.js'; import DropdownMenu from './utils/components/DropdownMenu.js'; import SVGIcon from '../../src/react/SVGIcon.js'; const iconLabelPositions = [ '', 'bottom', 'top', 'left', 'right' ]; const iconColors = [ '', 'primary', 'secondary', 'positive', 'negative', 'warning' ]; const disabledStates = ['false', 'true']; function buildExamples({iconName, iconLabel, labelPosition, color, disabled}) { return { Example: { jsx: } }; } const IconTable = ({onClick}) => (
{ICON_NAMES.map(icon => (
onClick(icon)} label={icon} iconClassName='storybook-small' name={icon} />
))}
); class Icons extends React.Component { constructor(props) { super(props); this.state = { iconName: ICON_NAMES[0], iconLabel: '', labelPosition: iconLabelPositions[0], color : iconColors[0] }; } render() { let {iconName, iconLabel, labelPosition, color, disabled} = this.state; return (

Icons

this.setState({iconName: e.target.value})} options={ICON_NAMES} />
this.setState({iconLabel: e.target.value})}/>
this.setState({labelPosition: e.target.value})} options={iconLabelPositions} /> this.setState({color: e.target.value})} options={iconColors} /> this.setState({disabled: e.target.value})} options={disabledStates} />
this.setState({iconName: icon})} />
You will see the following if the icon name you used is not found:
{}} name='MissingIcon' />
); }; } export default Icons;