@navikt/ds-react
Version:
React components from the Norwegian Labour and Welfare Administration.
24 lines (23 loc) • 855 B
TypeScript
import React from "react";
export interface RowProps extends React.HTMLAttributes<HTMLTableRowElement> {
/**
* Row is selected
* @default false
*/
selected?: boolean;
/**
* Shade the table row on hover.
* @default true
*/
shadeOnHover?: boolean;
/**
* Click handler for row. This differs from onClick by not being called
* when clicking on interactive elements within the row (buttons, links, inputs etc).
*
* **Warning:** This will not be accessible by keyboard! Provide an alternative way to select the row, e.g. a checkbox or a button.
*/
onRowClick?: (event: React.MouseEvent<HTMLTableRowElement>) => void;
}
export type RowType = React.ForwardRefExoticComponent<RowProps & React.RefAttributes<HTMLTableRowElement>>;
export declare const Row: RowType;
export default Row;