@azure-utils/storybooks
Version:
Utils to upload and manage Storybooks via Azure Functions and storage.
15 lines (14 loc) • 556 B
TypeScript
export type TableItem = Record<string, unknown>;
export type TableProps<T extends TableItem> = {
data: T[];
columns: (TableColumn<NoInfer<T>> | undefined)[];
caption?: JSX.Element;
toolbar?: JSX.Element;
};
export type TableColumn<T extends TableItem> = {
id: keyof T | (string & {});
header?: JSX.Element;
cell?: (item: T) => JSX.Element | null;
style?: JSX.HtmlTag["style"];
};
export declare function Table<T extends TableItem>({ caption: safeCaption, columns, data, toolbar: safeToolbar, }: TableProps<T>): JSX.Element;