"use client"; import React from "react"; import { ListWidgetConfig } from "../../types"; import { Label } from "@/components/ui/label"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group"; import { Input } from "@/components/ui/input"; interface ListTableOptionsProps { config: ListWidgetConfig; onConfigChange: (updates: Partial) => void; } /** * 리스트 테이블 옵션 설정 컴포넌트 * - 페이지 크기, 검색, 정렬 등 설정 */ export function ListTableOptions({ config, onConfigChange }: ListTableOptionsProps) { return (
{/* 뷰 모드 */}
onConfigChange({ viewMode: value })} className="flex items-center gap-3" >
{/* 카드 뷰 컬럼 수 */} {config.viewMode === "card" && (
onConfigChange({ cardColumns: parseInt(e.target.value) || 3 })} className="h-6 w-full px-1.5 text-[11px]" />

한 줄에 표시할 카드 개수 (1-6)

)} {/* 페이지 크기 */}
{/* 기능 활성화 */}
onConfigChange({ enablePagination: value === "enabled" })} className="flex items-center gap-3" >
{/* 헤더 표시 */} {config.viewMode === "table" && (
onConfigChange({ showHeader: value === "show" })} className="flex items-center gap-3" >
)} {/* 줄무늬 행 */} {config.viewMode === "table" && (
onConfigChange({ stripedRows: value === "enabled" })} className="flex items-center gap-3" >
)}
); }