PromoTable
organisms
Promo code management table — code, discount type, value, usage, expiry, status. Bulk actions (activate/deactivate/delete).
ARIA Role: table
Demo
| Name | Status | Amount |
|---|---|---|
| Invoice #001 | Paid | $1,200.00 |
| Invoice #002 | Pending | $850.00 |
Props
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
promos | PromoCode[] | Yes | — | 0-100 promos |
onBulkAction | BulkActionHandler | Yes | — |
TypeScript Interface
interface PromoTableProps {
promos: PromoCode[];
onBulkAction: (action: 'activate' | 'deactivate' | 'delete', ids: string[]) => Promise<void>;
onPromoCreate: () => void;
filter?: { status?: 'active' | 'inactive' | 'expired' | 'all' };
}Assertions (NASA Rule 5)
- [type]promos bounded 0-100 (NASA Rule 2)(NASA Rule 2)
- [aria]Bulk action confirmation uses role='alertdialog'(WCAG 4.1.3)
Usage
Import
import { Promotable } from '@epasslive/design-system'Basic
<Promotable />With Variants
<Promotable variant="primary" size="md" />