@eccenca/gui-elements
Version:
GUI elements based on other libraries, usable in React application, written in Typescript.
18 lines (17 loc) • 1.1 kB
TypeScript
import React from "react";
import { TableExpandHeaderProps as CarbonTableExpandHeaderProps } from "@carbon/react/es/components/DataTable/TableExpandHeader";
import { TestIconProps } from "../Icon";
import { ValidIconName } from "../Icon/canonicalIconNames";
export interface TableExpandHeaderProps extends Omit<CarbonTableExpandHeaderProps, "children" | "ariaLabel" | "enableExpando" | "expandIconDescription" | "aria-label">, React.ThHTMLAttributes<HTMLTableCellElement> {
/**
* This text is displayed as tooltip for the button that toggles the expanded/collapsed state.
*/
togglerText: string;
/** An optional icon that is shown as toggle icon. */
toggleIcon?: ValidIconName | string[] | React.ReactElement<TestIconProps>;
}
/**
* Adds a button to the table header that can trigger a function to expand/collapse all rows of the table.
*/
export declare function TableExpandHeader({ togglerText, isExpanded, onExpand, className, enableToggle, toggleIcon, ...otherCarbonTableExpandHeaderProps }: TableExpandHeaderProps): React.JSX.Element;
export default TableExpandHeader;