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 { ButtonPrimaryWrapper } from "./ButtonPrimaryComponent";
|
|
|
|
|
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: {
|
2025-09-12 14:24:25 +09:00
|
|
|
text: "저장",
|
2025-09-11 18:38:28 +09:00
|
|
|
actionType: "button",
|
|
|
|
|
variant: "primary",
|
2025-09-12 14:24:25 +09:00
|
|
|
action: {
|
|
|
|
|
type: "save",
|
|
|
|
|
successMessage: "저장되었습니다.",
|
|
|
|
|
errorMessage: "저장 중 오류가 발생했습니다.",
|
|
|
|
|
},
|
2025-09-11 18:38:28 +09:00
|
|
|
},
|
2025-10-14 16:45:30 +09:00
|
|
|
defaultSize: { width: 120, height: 40 },
|
2025-11-17 15:25:08 +09:00
|
|
|
configPanel: undefined, // 상세 설정 패널(ButtonConfigPanel)이 대신 사용됨
|
2025-09-11 18:38:28 +09:00
|
|
|
icon: "MousePointer",
|
|
|
|
|
tags: ["버튼", "액션", "클릭"],
|
|
|
|
|
version: "1.0.0",
|
|
|
|
|
author: "개발팀",
|
|
|
|
|
documentation: "https://docs.example.com/components/button-primary",
|
|
|
|
|
});
|
|
|
|
|
|
2025-09-12 14:24:25 +09:00
|
|
|
// 컴포넌트는 ButtonPrimaryRenderer에서 자동 등록됩니다
|
2025-09-11 18:38:28 +09:00
|
|
|
|
|
|
|
|
// 타입 내보내기
|
|
|
|
|
export type { ButtonPrimaryConfig } from "./types";
|
|
|
|
|
|
|
|
|
|
// 컴포넌트 내보내기
|
|
|
|
|
export { ButtonPrimaryComponent } from "./ButtonPrimaryComponent";
|
|
|
|
|
export { ButtonPrimaryRenderer } from "./ButtonPrimaryRenderer";
|