export const SwatchLegend = ({ swatches }) => (
<div className={styles.swatchLegend}>
{swatches &&
swatches.map((swatch) => {
const { color, label, value, units } = swatch;
return (
<Swatch
key={label}
label={label}
color={color}
value={value}
units={units}
/>
);
})}
</div>
);
Should key be value instead of label? I'm seeing a config.json that has categories with the same name but different values, not sure if that's intentional.
Should
keybevalueinstead oflabel? I'm seeing a config.json that has categories with the same name but different values, not sure if that's intentional.