import { storiesOf } from "@storybook/react";
import { ExcelExportButton, IRow, Table, useExportDisplayedTableData, VisibleType } from "@vivid-planet/comet-admin";
import * as React from "react";
interface IExampleRow extends IRow {
id: number;
column1: string | number | null;
column2: string | number | null;
column3: string | number | null;
column4: string | number | null;
column5: string | number | null;
}
function Story() {
const data: IExampleRow[] = [
{ id: 1, column1: 1, column2: 2, column3: 3, column4: 4, column5: 5 },
{ id: 2, column1: 1, column2: 2, column3: 3, column4: 4, column5: 5 },
{ id: 3, column1: 1, column2: 2, column3: 3, column4: 4, column5: 5 },
{ id: 4, column1: 1, column2: 2, column3: 3, column4: 4, column5: 5 },
{ id: 5, column1: 1, column2: 2, column3: 3, column4: 4, column5: 5 },
];
const exportApi = useExportDisplayedTableData({ fileName: "Custom File Name", worksheetName: "Custom Worksheet Name" });
/*
* Browser: Show columns 1 and 5
* Export: Show columns 1, 3 and 4
* */
return (
<>