/** * Copyright (c) OpenLens Authors. All rights reserved. * Licensed under MIT License. See LICENSE in root directory for more information. */ import "./table-row.scss"; import type { CSSProperties } from "react"; import React from "react"; import { cssNames } from "../../utils"; 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?: Item; // data for sorting callback in searchItem?: Item; // data for searching filters in
disabled?: boolean; testId?: string; } export class TableRow extends React.Component> { render() { const { className, nowrap, selected, disabled, children, sortItem, searchItem, testId, ...rowProps } = this.props; const classNames = cssNames("TableRow", className, { selected, nowrap, disabled }); return (
{children}
); } }