import "./table-row.scss"; import React, { CSSProperties } from "react"; import { cssNames } from "../../utils"; import { ItemObject } from "../../item.store"; export type TableRowElem = React.ReactElement; export interface TableRowProps extends React.DOMAttributes { className?: string; selected?: boolean; style?: CSSProperties; nowrap?: boolean; // white-space: nowrap, align inner in one line sortItem?: ItemObject | any; // data for sorting callback in searchItem?: ItemObject | any; // data for searching filters in
disabled?: boolean; } export class TableRow extends React.Component { render() { const { className, nowrap, selected, disabled, children, sortItem, searchItem, ...rowProps } = this.props; const classNames = cssNames("TableRow", className, { selected, nowrap, disabled }); return (
{children}
) } }