feat: pick select field option colors (#2748)

Closes #2433

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Thaïs
2023-11-29 12:49:41 +01:00
committed by GitHub
parent aa4bd0146b
commit 3617abb0e6
14 changed files with 186 additions and 97 deletions
@@ -1,10 +1,9 @@
import { z } from 'zod';
import { mainColors, ThemeColor } from '@/ui/theme/constants/colors';
import { themeColorSchema } from '@/ui/theme/utils/themeColorSchema';
const selectColors = Object.keys(mainColors) as [ThemeColor, ...ThemeColor[]];
const selectValueSchema = z.object({
color: z.enum(selectColors),
color: themeColorSchema,
label: z.string(),
});