import React, { useMemo } from "react"; import { RelatedComponent } from "vibe-storybook-components"; import { Calendar, Doc, Status } from "../../../../components/Icon/Icons"; import { Label, Table, TableBody, TableCell, TableHeader, TableHeaderCell, TableRow } from "../../../../components"; import { statusColumnToLabelColor, TableEmptyState, TableErrorState } from "../../../../components/Table/Table/__stories__/Table.stories.helpers"; const tableColumns = [ { id: "sentOn", title: "Sent", icon: Calendar, width: 75 }, { id: "subject", title: "Subject", icon: Doc }, { id: "status", title: "Status", icon: Status, width: 120 } ]; const tableData = [ { id: "1", sentOn: "Apr 22", subject: "Limited time offer: AP Process", sentBy: "John Doe", status: "In progress" }, { id: "2", sentOn: "Apr 22", subject: "Action required: Update your AP", sentBy: "Jane Doe", status: "Queued" }, { id: "3", sentOn: "Apr 22", subject: "Limited time offer: AP Process", sentBy: "Peter Smith", status: "Sent" } ]; export const TableDescription = () => { const component = useMemo( () => (
} emptyState={} columns={tableColumns}> {tableColumns.map(cell => ( ))} {tableData.map(rowItem => ( {rowItem.sentOn} {rowItem.subject} ))}
), [] ); return ( ); };