Skip to content

Commit

Permalink
chore: add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
junghyeonsu committed Oct 2, 2024
1 parent 1f658f9 commit b475431
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions component-docs/schemas/component.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,41 @@
import { z } from "zod";

export const componentMetadataSchema = z.object({
/**
* @description 컴포넌트 이름
* @example chip-tabs, alert-dialog
*/
name: z.string(),

description: z.string().optional(),

/**
* @description 컴포넌트 의존성
* @example @seed-design/react-tabs
*/
dependencies: z.array(z.string()).optional(),

/**
* @description 컴포넌트 개발 의존성
*/
devDependencies: z.array(z.string()).optional(),

/**
* @description 컴포넌트 내부의 Seed Design 컴포넌트 의존성
* @example action-button
*/
innerDependencies: z.array(z.string()).optional(),

/**
* @description 컴포넌트 코드 스니펫 경로, 여러 파일이 될 수 있어서 배열로 정의
* @example component/alert-dialog.tsx
*/
snippets: z.array(z.string()),

/**
* @description 컴포넌트 타입
* pattern, component과 같은 타입들이 추가될 수 있음.
*/
type: z.enum(["component"]),
});

Expand Down

0 comments on commit b475431

Please sign in to comment.