Added standardized colors
This commit is contained in:
@@ -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
1
models/Color.ts
Normal 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"
|
||||
Reference in New Issue
Block a user