import PropTypes from 'prop-types'; import React from 'react'; import { icons, kinds } from 'Helpers/Props'; import LegendIconItem from './LegendIconItem'; import LegendItem from './LegendItem'; import styles from './Legend.css'; function Legend(props) { const { showCutoffUnmetIcon, colorImpairedMode } = props; const iconsToShow = []; if (showCutoffUnmetIcon) { iconsToShow.push( ); } return (
{ iconsToShow.length > 0 &&
{iconsToShow[0]}
}
); } Legend.propTypes = { showCutoffUnmetIcon: PropTypes.bool.isRequired, colorImpairedMode: PropTypes.bool.isRequired }; export default Legend;