Added standardized colors

This commit is contained in:
Alexis
2024-06-10 22:25:34 +02:00
parent 69f18e9338
commit 9127346131
9 changed files with 119 additions and 87 deletions

View File

@@ -1,11 +1,14 @@
import { z } from 'zod'
import type { RPGColor } from './Color'
export interface Category {
id: number
name: string
color?: RPGColor
}
export const categorySchema = z.object({
id: z.number().int(),
name: z.string()
name: z.string(),
color: z.string().default("black")
})

1
models/Color.ts Normal file
View File

@@ -0,0 +1 @@
export type RPGColor = "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" | "black" | "white"