From 426a350f7dd083ec84c29ed8557a66b4576402c1 Mon Sep 17 00:00:00 2001 From: Borghild Date: Thu, 7 Mar 2024 14:01:06 +0100 Subject: [PATCH] :art: remove energy red as background --- .../ColorSelector/ColorSelector.tsx | 27 ++++++++++--------- sanityv3/schemas/defaultColors.js | 2 +- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/sanityv3/schemas/components/ColorSelector/ColorSelector.tsx b/sanityv3/schemas/components/ColorSelector/ColorSelector.tsx index a95adbe29..61aa58c08 100644 --- a/sanityv3/schemas/components/ColorSelector/ColorSelector.tsx +++ b/sanityv3/schemas/components/ColorSelector/ColorSelector.tsx @@ -23,8 +23,9 @@ const InnerCircle = styled.div<{ color: string }>` export type ColorSelectorValue = { title: string value: string - dark: boolean - key: string + dark?: boolean + key?: string + onlyTextColor?: boolean } type ColorCircleProps = { @@ -77,16 +78,18 @@ export const ColorSelector = ({ value, onChange, schemaType }: ColorSelectorProp {colors && ( - {colors.map((colorItem: ColorSelectorValue) => { - return ( - - ) - })} + {colors + .filter((colorItem: ColorSelectorValue) => !colorItem?.onlyTextColor) + .map((colorItem: ColorSelectorValue) => { + return ( + + ) + })} )} diff --git a/sanityv3/schemas/defaultColors.js b/sanityv3/schemas/defaultColors.js index 988083fd7..ca25f7f27 100644 --- a/sanityv3/schemas/defaultColors.js +++ b/sanityv3/schemas/defaultColors.js @@ -24,5 +24,5 @@ export const defaultColors = [ { title: 'Mid Orange', value: colors.orange[50], key: 'orange-50', dark: false }, { title: 'Mid Blue', value: colors.blue[50], key: 'blue-50', dark: true }, { title: 'Mid Green', value: colors.green[50], key: 'green-50', dark: false }, - { title: 'Energy Red', value: colors['energy-red'][100], key: 'energy-red-50', dark: false }, + { title: 'Energy Red', value: colors['energy-red'][100], key: 'energy-red-50', dark: false, onlyTextColor: true }, ]