@awsui/components-react
Version:
On July 19th, 2022, we launched [Cloudscape Design System](https://cloudscape.design). Cloudscape is an evolution of AWS-UI. It consists of user interface guidelines, front-end components, design resources, and development tools for building intuitive, en
31 lines • 791 B
TypeScript
import { TableProps } from '../interfaces';
interface ExpandableItemProps<T> extends ExpandableItemDetail<T> {
isExpandable: boolean;
isExpanded: boolean;
onExpandableItemToggle: () => void;
expandButtonLabel?: string;
collapseButtonLabel?: string;
}
interface ExpandableItemDetail<T> {
level: number;
setSize: number;
posInSet: number;
parent: null | T;
children: readonly T[];
}
export declare function useExpandableTableProps<T>({
items,
expandableRows,
trackBy,
ariaLabels
}: {
items: readonly T[];
expandableRows?: TableProps.ExpandableRows<T>;
trackBy?: TableProps.TrackBy<T>;
ariaLabels?: TableProps.AriaLabels<T>;
}): {
isExpandable: boolean;
allItems: readonly T[];
getExpandableItemProps: (item: T) => ExpandableItemProps<T>;
};
export {};