import { Card, Title, Text, Table, Stack, Badge } from '@repo/ui/components'; import { PageActions, RowActions, PageActionProps, RowActionProps } from '@repo/ui/components'; import { Save, Printer, Trash, MoreVertical, Edit, FileText, CheckCircle, Check } from 'lucide-react'; export default function ActionToolsShowcase() { const pageActions: PageActionProps[] = [ { key: 'save', label: 'Save Changes', icon: , variant: 'filled', onClick: (key) => console.log('Clicked', key), }, { key: 'save', label: 'Save Changes', icon: , onClick: (key) => console.log('Clicked', key), }, { type: 'divider' }, { key: 'print', label: 'Print', icon: , children: [ { key: 'print-original', label: 'Print Original', icon: , onClick: (k) => console.log(k), }, // { type: 'divider' }, { key: 'print-copy', label: 'Print Copy', icon: , onClick: (k) => console.log(k) }, { key: 'print-copy', label: 'Print Copy', icon: , onClick: (k) => console.log(k) }, { key: 'print-copy', label: 'Print Copy', icon: , onClick: (k) => console.log(k) }, ], }, { key: 'confirm', label: 'Confirm', icon: , onClick: (key) => console.log('Clicked', key), }, { key: 'delete', label: 'Delete', icon: , intent: 'destructive', onClick: (key) => console.log('Clicked', key), }, { key: 'success', label: 'Success', icon: , intent: 'success', onClick: (key) => console.log('Clicked', key), }, { key: 'warning', label: 'Warning', icon: , intent: 'warning', onClick: (key) => console.log('Clicked', key), }, { key: 'Primary', label: 'Primary', icon: , intent: 'primary', onClick: (key) => console.log('Clicked', key), }, ]; const rowActions: RowActionProps[] = [ { key: 'edit', tooltip: 'Edit Record', label: 'Edit Record', icon: , onClick: (key) => console.log('Clicked', key), }, { key: 'approve', tooltip: 'Approve', label: 'Approve', icon: , intent: 'success', onClick: (key) => console.log('Clicked', key), }, { key: 'more', label: 'More Options', icon: , children: [ { key: 'delete', label: 'Delete Record', icon: , intent: 'destructive', onClick: (k) => console.log(k), }, ], }, ]; const tableData = [ { id: '1', name: 'Invoice #001', status: 'Pending' }, { id: '2', name: 'Invoice #002', status: 'Approved' }, ]; return ( Page Actions Used in toolbars and page headers. Row Actions Used inside data grids or list items. ID Name Status Actions {tableData.map((row) => ( {row.id} {row.name} {row.status} ))}
); }