컴포넌트 추가방식 변경
This commit is contained in:
45
frontend/lib/registry/components/textarea-basic/config.ts
Normal file
45
frontend/lib/registry/components/textarea-basic/config.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
"use client";
|
||||
|
||||
import { TextareaBasicConfig } from "./types";
|
||||
|
||||
/**
|
||||
* TextareaBasic 컴포넌트 기본 설정
|
||||
*/
|
||||
export const TextareaBasicDefaultConfig: TextareaBasicConfig = {
|
||||
placeholder: "내용을 입력하세요",
|
||||
rows: 3,
|
||||
maxLength: 1000,
|
||||
|
||||
// 공통 기본값
|
||||
disabled: false,
|
||||
required: false,
|
||||
readonly: false,
|
||||
variant: "default",
|
||||
size: "md",
|
||||
};
|
||||
|
||||
/**
|
||||
* TextareaBasic 컴포넌트 설정 스키마
|
||||
* 유효성 검사 및 타입 체크에 사용
|
||||
*/
|
||||
export const TextareaBasicConfigSchema = {
|
||||
placeholder: { type: "string", default: "" },
|
||||
rows: { type: "number", default: 3, min: 1, max: 20 },
|
||||
cols: { type: "number", min: 1 },
|
||||
maxLength: { type: "number", min: 1 },
|
||||
|
||||
// 공통 스키마
|
||||
disabled: { type: "boolean", default: false },
|
||||
required: { type: "boolean", default: false },
|
||||
readonly: { type: "boolean", default: false },
|
||||
variant: {
|
||||
type: "enum",
|
||||
values: ["default", "outlined", "filled"],
|
||||
default: "default"
|
||||
},
|
||||
size: {
|
||||
type: "enum",
|
||||
values: ["sm", "md", "lg"],
|
||||
default: "md"
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user