ERP-node/frontend/lib/registry/components/text-input/index.ts

44 lines
1.4 KiB
TypeScript
Raw Normal View History

2025-09-11 18:38:28 +09:00
"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",
});
2025-09-12 14:24:25 +09:00
// 컴포넌트는 TextInputRenderer에서 자동 등록됩니다
2025-09-11 18:38:28 +09:00
// 타입 내보내기
export type { TextInputConfig } from "./types";
// 컴포넌트 내보내기
export { TextInputComponent } from "./TextInputComponent";
export { TextInputRenderer } from "./TextInputRenderer";