import { classNames } from '@standardnotes/snjs' import Icon from '../Icon/Icon' import { Table } from './CommonTypes' function Table({ table }: { table: Table }) { return (
{table.showSelectionActions && table.selectedRows.length >= 2 && (
{table.selectedRows.length} selected {table.selectedRows.length > 0 && table.selectionActions}
)} {table.headers.map((header, index) => { return ( ) })} {table.rows.map((row) => { return ( {row.cells.map((cell, index) => { return ( ) })} {row.rowActions ? (
{row.rowActions}
) : null} ) })}
{header.name} {header.isSorting && ( )}
{cell}
) } export default Table