import { useState } from "@lynx-js/react"; import { LoopScroll } from "@seed-design/lynx-react-loop-scroll"; const ITEM_SIZE = 44; const VISIBLE_ITEM_COUNT = 5; const HOURS = Array.from({ length: 24 }, (_, index) => `${index}시`); const MINUTES = Array.from({ length: 60 }, (_, index) => `${index}분`); interface ColumnProps { id: string; labels: string[]; index: number; onIndexChange: (index: number) => void; } function Column({ id, labels, index, onIndexChange }: ColumnProps) { return ( {(item) => ( {labels[item.index]} )} ); } export default function LoopScrollTwoColumnsExample() { const [hour, setHour] = useState(9); const [minute, setMinute] = useState(30); function handleHourChange(nextHour: number) { "background only"; setHour(nextHour); } function handleMinuteChange(nextMinute: number) { "background only"; setMinute(nextMinute); } return ( 시와 분을 따로 끌어보세요 {`hour=${hour} minute=${minute}`} ); }