PayoutWindowCard
The Payouts tab's month card: its status, the payout window (one ink pip a day) and how many creators are paid.
import { PayoutWindowCard } from '@ergasti/bricks';Examples
Payout window
Where today sits in the monthly window (day 4 of 11), how many creators are paid so far, and the window's status. The status words come from the TRNDR preset, so this example is pinned to it.
Code
import { PayoutWindowCard } from '@ergasti/bricks';
function Window() {
return (
<div style={{ display: 'grid', gap: 16, maxWidth: 520 }}>
<PayoutWindowCard title="November payouts" status="pending" day={4} windowDays={11} paid={38} creators={112} />
<PayoutWindowCard title="October payouts" status="paid" day={11} windowDays={11} paid={104} creators={104} />
</div>
);
}Props
Prop
Type
Labels
Every word this component draws, in both languages. Override one per component and language with BricksProvider labels under the key payoutWindowCard, or with the component's own prop where it has one. A {name} is a value the component fills in.
| Key | English | Arabic |
|---|---|---|
sub | The TRNDR team pays approved commission between the 10th and 20th, with proof. | فريق TRNDR بيدفع العمولة المتوافق عليها من يوم 10 لحد يوم 20، ومعاها إثبات. |
window | Payout window | فترة الدفع |
dayOf | Day {d} of {n} | اليوم {d} من {n} |
paid | Creators paid | صنّاع المحتوى اللي اتدفعلهم |
Design guidance
How the BRICKS design system uses PayoutWindowCard. Written in docs/content/components/PayoutWindowCard.md; the props above are read from the code, which wins where the two disagree.
The Payouts tab's month card: the month's payout title and status, a line on how payouts work, the payout window (one ink pip a day, "Day 4 of 11") and creators paid so far ("38 / 112").
It is the mock's payouts .card.s7 on Brand › Payments › Payouts. TRNDR pays approved commission between the 10th and 20th of each month with proof; this card tells the brand where that window stands. It sits beside the "To be paid" / "Paid so far" Tile size="short" pair.
Anatomy
- Card:
Cardwith header title ("November payout"), sub "The TRNDR team pays approved commission between the 10th and 20th, with proof." and aStatusPillat the end. - Window row:
ProgressRow"Payout window", one ink pip per day, "Day 4 of 11". - Paid row:
ProgressRow"Creators paid", 28 pips, "38 / 112".
Variants
status | Pill | When |
|---|---|---|
'pending' | Pending | Window not finished. |
'paid' | Paid | All paid. |
other ConsoleStatus keys | as the provider names them | Server states. |
States
| State | Trigger |
|---|---|
| Not started | day: 0, paid: 0: empty pips. |
| In progress | partial pips. |
| Paid | status="paid", full rows. |
Types
PayoutWindowCopy (labels): sub, window, dayOf(d, n), paid.
Usage
// Brand › Payments › Payouts
<PayoutWindowCard title="November payout" status="pending" day={4} windowDays={11} paid={38} creators={112} />
<div style={{ display: 'grid', gap: 16, gridTemplateColumns: '1fr 1fr' }}>
<Tile size="short" tone="butter" label="To be paid this month" value={<Money value="38250.00" />} />
<Tile size="short" tone="lime" label="Paid so far this month" value={<Money value="96420.00" />} delta="See who was paid →" onSelect={() => setOpen('payout')} />
</div>
<Card title="Past payouts"><DataTable label="Past payouts" columns={payoutColumns('en', { onReceipt: (row) => openProof(row) })} rows={payouts} rowKey={(p) => p.id} /></Card>Where it appears
- Brand › Payments › Payouts › payout window card (BrandWallet).
Guidelines
Do
- Send the window length from the server (11 days for 10th–20th).
Don't
- Don't use it for wallet balance; that is
HeroCard/WalletHealthCard.
RTL and Arabic
- Mirrors; pips fill from the right. Arabic: "فترة الدفع", "اليوم 4 من 11", "صنّاع المحتوى اللي اتدفعلهم".
Tokens
Card tokens; ProgressRow pips (--ink, --lime, --track).
Accessibility
- Role and name: a
Card<section>named by its title heading ("November payout"); the sub line and status follow in reading order. - Not interactive: no focusable element, so no keyboard map; it never takes focus.
- Each row is a
ProgressRow: the label and "Day 4 of 11" / "38 / 112" are text, and the pips are onerole="img"named in words ("Payout window: 4 of 11", "Creators paid: 38 of 112"), so the figure is never only in the drawing. - Status is a
StatusPillword, not colour alone. - Nothing is announced on change; if the figures refresh while the page is open, the new text is simply read the next time.
- Contrast: ink pips on
--track15.8:1 and raspberry pips 4.4:1 (non-text, above 3:1);--ink-3captions on white 5.1:1.
Found in the source
- No roles, ARIA attributes or key handling are set in this component's own source; it renders native elements and the components it composes.
Read from the component's source and tests. See Accessibility for the patterns the library follows.
Related
PayoutBatchDetail,Tile(size="short"),ProofButton,ReceiptCard.
See also: Card · StatusPill · ProgressRow · useLanguage · WalletHealthCard · WalletLedger
Source
src/blocks/payments/PayoutWindowCard.tsx (line 38) on GitHub.