ERP-node/frontend/lib/registry/components/button-primary/index.ts

49 lines
1.6 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 { ButtonPrimaryWrapper } from "./ButtonPrimaryComponent";
import { ButtonPrimaryConfigPanel } from "./ButtonPrimaryConfigPanel";
import { ButtonPrimaryConfig } from "./types";
/**
* ButtonPrimary 컴포넌트 정의
* button-primary 컴포넌트입니다
*/
export const ButtonPrimaryDefinition = createComponentDefinition({
id: "button-primary",
name: "기본 버튼",
nameEng: "ButtonPrimary Component",
description: "일반적인 액션을 위한 기본 버튼 컴포넌트",
category: ComponentCategory.ACTION,
webType: "button",
component: ButtonPrimaryWrapper,
defaultConfig: {
text: "버튼",
actionType: "button",
variant: "primary",
},
defaultSize: { width: 120, height: 36 },
configPanel: ButtonPrimaryConfigPanel,
icon: "MousePointer",
tags: ["버튼", "액션", "클릭"],
version: "1.0.0",
author: "개발팀",
documentation: "https://docs.example.com/components/button-primary",
});
// ComponentRegistry에 등록
import { ComponentRegistry } from "../../ComponentRegistry";
ComponentRegistry.registerComponent(ButtonPrimaryDefinition);
console.log("🚀 ButtonPrimary 컴포넌트 등록 완료");
// 타입 내보내기
export type { ButtonPrimaryConfig } from "./types";
// 컴포넌트 내보내기
export { ButtonPrimaryComponent } from "./ButtonPrimaryComponent";
export { ButtonPrimaryRenderer } from "./ButtonPrimaryRenderer";