import { Details2Svg } from '../_shared/svg/Details2Svg'; import { RowInfo } from '../../stores/effects/database/row/row_cache'; import { useRow } from '../_shared/database-hooks/useRow'; import { DatabaseController } from '../../stores/effects/database/database_controller'; import { BoardCell } from './BoardCell'; import { Draggable } from 'react-beautiful-dnd'; export const BoardCard = ({ index, viewId, controller, rowInfo, onOpenRow, }: { index: number; viewId: string; controller: DatabaseController; rowInfo: RowInfo; onOpenRow: (rowId: RowInfo) => void; }) => { const { cells } = useRow(viewId, controller, rowInfo); return ( {(provided) => (
onOpenRow(rowInfo)} className={`relative cursor-pointer select-none rounded-lg border border-shade-6 bg-white px-3 py-2 transition-transform duration-100 hover:bg-main-selector `} >
{cells.map((cell, cellIndex) => ( ))}
)}
); };