Skip to content

[BUG] Swatch Legend key props #110

Description

@max172-hqt
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions