"use client"; import React from "react"; import { Label } from "@/components/ui/label"; import { Input } from "@/components/ui/input"; import { Switch } from "@/components/ui/switch"; interface SplitLineConfigPanelProps { config: any; onConfigChange: (config: any) => void; } /** * SplitLine 설정 패널 */ export const SplitLineConfigPanel: React.FC = ({ config, onConfigChange }) => { const currentConfig = config || {}; const handleChange = (key: string, value: any) => { onConfigChange({ ...currentConfig, [key]: value, }); }; return (

스플릿선 설정

{/* 드래그 리사이즈 허용 */}
handleChange("resizable", checked)} />
{/* 분할선 스타일 */}
handleChange("lineWidth", parseInt(e.target.value) || 4)} className="h-8 text-xs" min={1} max={12} />
handleChange("lineColor", e.target.value)} className="h-8 w-8 cursor-pointer rounded border" /> handleChange("lineColor", e.target.value)} className="h-8 flex-1 text-xs" placeholder="#e2e8f0" />

캔버스에서 스플릿선의 X 위치가 초기 분할 지점이 됩니다. 런타임에서 드래그하면 좌우 컴포넌트가 함께 이동합니다.

); }; export default SplitLineConfigPanel;