"use client"; import type { DividerBlockProps } from "@/features/editor/state/editorStore"; import { NumericPropertyControl } from "@/features/editor/components/NumericPropertyControl"; import { ColorPickerField, TEXT_COLOR_PALETTE } from "@/features/editor/components/ColorPickerField"; export type DividerPropertiesPanelProps = { dividerProps: DividerBlockProps; selectedBlockId: string; updateBlock: (id: string, partial: Partial) => void; }; export function DividerPropertiesPanel({ dividerProps, selectedBlockId, updateBlock }: DividerPropertiesPanelProps) { return ( <>

구분선 스타일

{/* 길이/너비 모드 */} {(dividerProps.widthMode ?? "full") === "fixed" && ( { updateBlock(selectedBlockId, { widthPx: v } as any); }} /> )} {/* 색상 */} { updateBlock(selectedBlockId, { colorHex: hex } as any); }} palette={TEXT_COLOR_PALETTE} onPaletteSelect={(item) => { updateBlock(selectedBlockId, { colorHex: item.color } as any); }} /> {/* 상하 여백 (슬라이더) */} { if (typeof dividerProps.marginYPx === "number") { return dividerProps.marginYPx; } const y = dividerProps.marginY ?? "md"; return y === "sm" ? 8 : y === "lg" ? 24 : 16; })()} min={0} max={50} step={2} presets={[ { id: "sm", label: "작게", value: 8 }, { id: "md", label: "보통", value: 16 }, { id: "lg", label: "크게", value: 24 }, ]} onChangeValue={(v) => { updateBlock(selectedBlockId, { marginYPx: v } as any); }} />
); }