Image properties customization (#1590)

This commit is contained in:
Manuel
2023-11-12 13:37:32 +01:00
committed by GitHub
parent e900a7b07e
commit 27037c6f50
7 changed files with 78 additions and 10 deletions

View File

@@ -1,5 +1,6 @@
import { DEFAULT_THEME, MANTINE_COLORS, MantineColor } from '@mantine/core';
import { z } from 'zod';
import { BackgroundImageAttachment, BackgroundImageRepeat, BackgroundImageSize } from '~/types/settings';
export const createBoardSchemaValidation = z.object({
name: z.string().min(2).max(25),
@@ -27,6 +28,9 @@ export const boardCustomizationSchema = z.object({
}),
appearance: z.object({
backgroundSrc: z.string(),
backgroundImageAttachment: z.enum(BackgroundImageAttachment),
backgroundImageSize: z.enum(BackgroundImageSize),
backgroundImageRepeat: z.enum(BackgroundImageRepeat),
primaryColor: z.custom<MantineColor>(
(value) => typeof value === 'string' && MANTINE_COLORS.includes(value)
),