import classNames from 'classnames'; import { Table, TableCell, TableCellProps, TableProps, } from '@aws-amplify/ui-react'; interface ResponsiveTableCellProps extends TableCellProps { label: string; children: React.ReactNode; } export function ResponsiveTableCell({ as = 'td', children, label, className, ...rest }: ResponsiveTableCellProps) { const componentClasses = classNames('docs-responsiveTable__cell', className); return ( {children} ); } interface ResponsiveTableProps extends TableProps { children: React.ReactNode; /* Width of cell label when table is collapsed */ labelWidth?: string; } /** * Usage: * * * * Name * * * Item * * */ export function ResponsiveTable({ labelWidth = '6rem', children, className, ...rest }: ResponsiveTableProps) { const componentClasses = classNames('docs-responsiveTable', className); const labelWidthStyle = { '--labelWidth': labelWidth } as React.CSSProperties; return ( {children}
); }