Skip to Content
BBRICKSv0.7.4
BlocksPayments

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.

Pinned to TRNDR preset
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.

payoutWindowCard
KeyEnglishArabic
subThe TRNDR team pays approved commission between the 10th and 20th, with proof.فريق TRNDR بيدفع العمولة المتوافق عليها من يوم 10 لحد يوم 20، ومعاها إثبات.
windowPayout windowفترة الدفع
dayOfDay {d} of {n}اليوم {d} من {n}
paidCreators 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

  1. Card: Card with header title ("November payout"), sub "The TRNDR team pays approved commission between the 10th and 20th, with proof." and a StatusPill at the end.
  2. Window row: ProgressRow "Payout window", one ink pip per day, "Day 4 of 11".
  3. Paid row: ProgressRow "Creators paid", 28 pips, "38 / 112".

Variants

statusPillWhen
'pending'PendingWindow not finished.
'paid'PaidAll paid.
other ConsoleStatus keysas the provider names themServer states.

States

StateTrigger
Not startedday: 0, paid: 0: empty pips.
In progresspartial pips.
Paidstatus="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

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 one role="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 StatusPill word, 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 --track 15.8:1 and raspberry pips 4.4:1 (non-text, above 3:1); --ink-3 captions 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.

See also: Card · StatusPill · ProgressRow · useLanguage · WalletHealthCard · WalletLedger

Source

src/blocks/payments/PayoutWindowCard.tsx (line 38) on GitHub.

On this page