PromoTable

organisms

Promo code management table — code, discount type, value, usage, expiry, status. Bulk actions (activate/deactivate/delete).

ARIA Role: table

Demo

NameStatusAmount
Invoice #001Paid$1,200.00
Invoice #002Pending$850.00

Props

PropTypeRequiredDefaultDescription
promosPromoCode[]Yes0-100 promos
onBulkActionBulkActionHandlerYes

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" />