"use client"; import { useReportDesigner } from "@/contexts/ReportDesignerContext"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Label } from "@/components/ui/label"; import { Input } from "@/components/ui/input"; import { Switch } from "@/components/ui/switch"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; import { Slider } from "@/components/ui/slider"; export function GridSettingsPanel() { const { gridConfig, updateGridConfig } = useReportDesigner(); return ( 그리드 설정 {/* 그리드 표시 */}
updateGridConfig({ visible })} />
{/* 스냅 활성화 */}
updateGridConfig({ snapToGrid })} />
{/* 프리셋 */}
{/* 셀 너비 */}
{gridConfig.cellWidth}px
updateGridConfig({ cellWidth: value })} min={5} max={100} step={5} className="w-full" />
{/* 셀 높이 */}
{gridConfig.cellHeight}px
updateGridConfig({ cellHeight: value })} min={5} max={100} step={5} className="w-full" />
{/* 그리드 투명도 */}
{Math.round(gridConfig.gridOpacity * 100)}%
updateGridConfig({ gridOpacity: value / 100 })} min={10} max={100} step={10} className="w-full" />
{/* 그리드 색상 */}
updateGridConfig({ gridColor: e.target.value })} className="h-8 w-16 cursor-pointer" /> updateGridConfig({ gridColor: e.target.value })} className="h-8 flex-1 font-mono text-xs" placeholder="#e5e7eb" />
{/* 그리드 정보 */}
행: {gridConfig.rows}
열: {gridConfig.columns}
); }