🐛 Fix keys attribute on ColorSelector

This commit is contained in:
ajnart
2022-08-01 21:11:37 +02:00
parent 8bc74f4e0f
commit c501cfae76
2 changed files with 3 additions and 6 deletions

View File

@@ -44,12 +44,11 @@ export function ColorSelector({ type }: ColorControlProps) {
};
const swatches = colors.map(({ color, swatch }) => (
<Grid.Col span={2}>
<Grid.Col span={2} key={color}>
<ColorSwatch
component="button"
type="button"
onClick={() => setConfigColor(color)}
key={color}
color={swatch}
size={22}
style={{ cursor: 'pointer' }}

View File

@@ -40,12 +40,11 @@ export function ShadeSelector() {
};
const primarySwatches = primaryShades.map(({ swatch, shade }) => (
<Grid.Col span={1}>
<Grid.Col span={1} key={Number(shade)}>
<ColorSwatch
component="button"
type="button"
onClick={() => setConfigShade(shade)}
key={Number(shade)}
color={swatch}
size={22}
style={{ cursor: 'pointer' }}
@@ -54,12 +53,11 @@ export function ShadeSelector() {
));
const secondarySwatches = secondaryShades.map(({ swatch, shade }) => (
<Grid.Col span={1}>
<Grid.Col span={1} key={Number(shade)}>
<ColorSwatch
component="button"
type="button"
onClick={() => setConfigShade(shade)}
key={Number(shade)}
color={swatch}
size={22}
style={{ cursor: 'pointer' }}