first commit
This commit is contained in:
22
src/content/schemas/skills.ts
Normal file
22
src/content/schemas/skills.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
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>;
|
||||
Reference in New Issue
Block a user