"use client"; import React from "react"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { Checkbox } from "@/components/ui/checkbox"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; import { ButtonPrimaryConfig } from "./types"; export interface ButtonPrimaryConfigPanelProps { config: ButtonPrimaryConfig; onChange: (config: Partial) => void; } /** * ButtonPrimary 설정 패널 * 컴포넌트의 설정값들을 편집할 수 있는 UI 제공 */ export const ButtonPrimaryConfigPanel: React.FC = ({ config, onChange }) => { const handleChange = (key: keyof ButtonPrimaryConfig, value: any) => { onChange({ [key]: value }); }; return (
button-primary 설정
{/* 버튼 관련 설정 */}
handleChange("text", e.target.value)} />
{/* 공통 설정 */}
handleChange("disabled", checked)} />
handleChange("required", checked)} />
handleChange("readonly", checked)} />
); };