feat(board): allow to set icon color of widgets (#2228)

Co-authored-by: Andre Silva <asilva01@acuitysso.com>
This commit is contained in:
Andre Silva
2025-02-19 19:45:12 +00:00
committed by GitHub
parent 58babbf88f
commit de5c34ab07
23 changed files with 3790 additions and 38 deletions

View File

@@ -13,6 +13,11 @@ import { commonItemSchema, createSectionSchema } from "./shared";
const hexColorSchema = z.string().regex(/^#[0-9A-Fa-f]{6}$/);
const hexColorNullableSchema = hexColorSchema
.or(z.literal(""))
.nullable()
.transform((value) => (value?.trim().length === 0 ? null : value));
const boardNameSchema = z
.string()
.min(1)
@@ -58,6 +63,7 @@ const savePartialSettingsSchema = z
opacity: z.number().min(0).max(100),
customCss: z.string().max(16384),
columnCount: z.number().min(1).max(24),
iconColor: hexColorNullableSchema,
itemRadius: z.union([z.literal("xs"), z.literal("sm"), z.literal("md"), z.literal("lg"), z.literal("xl")]),
disableStatus: z.boolean(),
})