import { Details2Svg } from '../_shared/svg/Details2Svg'; import { RowInfo } from '$app/stores/effects/database/row/row_cache'; import { useRow } from '../_shared/database-hooks/useRow'; import { DatabaseController } from '$app/stores/effects/database/database_controller'; import { BoardCell } from './BoardCell'; import { Draggable } from 'react-beautiful-dnd'; import { MouseEventHandler } from 'react'; export const BoardCard = ({ index, viewId, controller, rowInfo, groupByFieldId, onOpenRow, }: { index: number; viewId: string; controller: DatabaseController; rowInfo: RowInfo; groupByFieldId: string; onOpenRow: (rowId: RowInfo) => void; }) => { const { cells } = useRow(viewId, controller, rowInfo); const onDetailClick: MouseEventHandler = (e) => { e.stopPropagation(); // onOpenRow(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 .filter((cell) => cell.fieldId !== groupByFieldId) .map((cell, cellIndex) => ( ))}
)}
); };