23 lines
585 B
TypeScript
23 lines
585 B
TypeScript
import { z } from 'zod';
|
|
|
|
export const SkillSchema = z.object({
|
|
name: z.string(),
|
|
icon: z.string(),
|
|
level: z.enum(['primary', 'secondary']).default('primary'),
|
|
});
|
|
|
|
export const SkillCategorySchema = z.object({
|
|
id: z.string(),
|
|
label: z.string(),
|
|
items: z.array(SkillSchema),
|
|
});
|
|
|
|
export const SkillsSchema = z.object({
|
|
primary: z.array(SkillCategorySchema),
|
|
secondary: z.array(SkillCategorySchema),
|
|
});
|
|
|
|
export type Skill = z.infer<typeof SkillSchema>;
|
|
export type SkillCategory = z.infer<typeof SkillCategorySchema>;
|
|
export type Skills = z.infer<typeof SkillsSchema>;
|