"use client"; import type { ImageBlockProps } from "@/features/editor/state/editorStore"; import { NumericPropertyControl } from "@/features/editor/components/NumericPropertyControl"; export type ImagePropertiesPanelProps = { imageProps: ImageBlockProps; selectedBlockId: string; updateBlock: (id: string, partial: Partial) => void; }; export function ImagePropertiesPanel({ imageProps, selectedBlockId, updateBlock }: ImagePropertiesPanelProps) { return ( <>

이미지 스타일

{/* 정렬 */} {/* 너비 모드 */} {(imageProps.widthMode ?? "auto") === "fixed" && ( { updateBlock(selectedBlockId, { widthPx: v, } as any); }} /> )} {/* 모서리 둥글기 */} { const r = imageProps.borderRadius ?? "md"; return r === "none" ? 0 : r === "sm" ? 2 : r === "lg" ? 6 : r === "full" ? 8 : 4; })()} min={0} max={8} step={1} presets={[ { id: "none", label: "없음", value: 0 }, { id: "sm", label: "작게", value: 2 }, { id: "md", label: "보통", value: 4 }, { id: "lg", label: "크게", value: 6 }, { id: "full", label: "완전 둥글게", value: 8 }, ]} onChangeValue={(v) => { const next = v <= 0 ? "none" : v <= 2 ? "sm" : v <= 5 ? "md" : v <= 7 ? "lg" : "full"; updateBlock(selectedBlockId, { borderRadius: next, } as any); }} />
); }