Files
portfolio/src/content/schemas/skills.ts
Johan LEROY 9e9bc0f23d first commit
2026-04-21 14:14:03 +02:00

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>;