Files
pipeline/frontend/lib/registry/components/text-input/index.ts
T
2025-09-11 18:38:28 +09:00

48 lines
1.5 KiB
TypeScript

"use client";
import React from "react";
import { createComponentDefinition } from "../../utils/createComponentDefinition";
import { ComponentCategory } from "@/types/component";
import type { WebType } from "@/types/screen";
import { TextInputWrapper } from "./TextInputComponent";
import { TextInputConfigPanel } from "./TextInputConfigPanel";
import { TextInputConfig } from "./types";
/**
* TextInput 컴포넌트 정의
* text-input 컴포넌트입니다
*/
export const TextInputDefinition = createComponentDefinition({
id: "text-input",
name: "텍스트 입력",
nameEng: "TextInput Component",
description: "텍스트 입력을 위한 기본 입력 컴포넌트",
category: ComponentCategory.INPUT,
webType: "text",
component: TextInputWrapper,
defaultConfig: {
placeholder: "텍스트를 입력하세요",
maxLength: 255,
},
defaultSize: { width: 200, height: 36 },
configPanel: TextInputConfigPanel,
icon: "Edit",
tags: ["텍스트", "입력", "폼"],
version: "1.0.0",
author: "개발팀",
documentation: "https://docs.example.com/components/text-input",
});
// ComponentRegistry에 등록
import { ComponentRegistry } from "../../ComponentRegistry";
ComponentRegistry.registerComponent(TextInputDefinition);
console.log("🚀 TextInput 컴포넌트 등록 완료");
// 타입 내보내기
export type { TextInputConfig } from "./types";
// 컴포넌트 내보내기
export { TextInputComponent } from "./TextInputComponent";
export { TextInputRenderer } from "./TextInputRenderer";