import React, { Fragment } from 'react'; import cx from 'classnames'; import { styles } from './styles'; const STATS = { critical: { color: styles.critical, bars: styles.oneBar, }, danger: { color: styles.danger, bars: styles.twoBars, }, warning: { color: styles.warning, bars: styles.threeBars, }, normal: { color: styles.normal, bars: styles.fourBars, }, }; const Icon = ({ level, grayscale }) => { const color = grayscale ? styles.normal : STATS[level].color; return (
); }; export default Icon;