Skip to Content
BBRICKSv0.7.4
Foundations

Money display

Show money with or without the currency, with cents, whole units or K / M, per component or app-wide.

The server sends money as a 2-decimal string and components show it as the screens ask: "EGP 1,234.50", "27,645.00" with no currency, "EGP 43,390" without zero cents, "EGP 184.3K". You choose the look with one option shape, MoneyDisplay, set at three levels. The rounding, the dropped cents and the K / M are done on BigInt cents, so a shown figure never goes through a float. For the string contract, the "?" notes and formatMoney see Money.

The option shape

MoneyDisplay has four fields. Every one is optional; a field you leave out falls through to the next level.

FieldValues (default first)What it does
showCurrencytrue, falseThe currency word with the figure ("EGP 27,645.00", "27,645.00 ج.م" in Arabic), or the figure alone ("27,645.00"). Use false where a legend or a column header already says the currency.
decimals2, 0, 'auto'2 always shows cents. 0 rounds to whole units, half away from zero. 'auto' shows cents only when they are not ".00" ("43,390", "1,200.50"). Ignored while compact is on.
compactfalse, trueK and M with one decimal from 1,000 ("EGP 184.3K", "EGP 11.2M"); whole units under 1,000.
sign'negative', 'always''negative' marks only money out ("− 61,200.00", a real minus sign). 'always' also marks money in ("+ 250,000.00"). A figure that is shown as zero never carries a sign.

Decimals and compact

The same figures through every combination: decimals 2 (default), 0 (rounded half away from zero) and 'auto' (cents only when they are not ".00"), then compact (K / M, one decimal; decimals is ignored). Money takes the options as money; compact alone stays as its shorthand.

Code
import { Money, type MoneyDisplay } from '@ergasti/bricks';

const cell = { padding: '6px 14px 6px 0', textAlign: 'start' as const };

function DecimalsAndCompact() {
  const values = ['1200.00', '1200.50', '43390.45', '184300.50', '11200000.00', '-61200.00'];
  const modes: Array<[string, MoneyDisplay]> = [
    ['decimals: 2', { decimals: 2 }],
    ['decimals: 0', { decimals: 0 }],
    ["decimals: 'auto'", { decimals: 'auto' }],
    ['compact', { compact: true }],
  ];
  return (
    <div style={{ overflowX: 'auto' }}>
      <table style={{ borderCollapse: 'collapse' }}>
        <thead>
          <tr><th style={cell} scope="col">Value</th>{modes.map(([name]) => <th key={name} style={cell} scope="col"><code>{name}</code></th>)}</tr>
        </thead>
        <tbody>
          {values.map((v) => (
            <tr key={v}>
              <th style={cell} scope="row"><code>{v}</code></th>
              {modes.map(([name, money]) => <td key={name} style={cell}><Money value={v} money={money} /></td>)}
            </tr>
          ))}
        </tbody>
      </table>
    </div>
  );
}

Currency and sign

showCurrency: false draws the figure alone (the currency is in a legend or a column header); sign: 'always' also marks money in with a "+". A figure that rounds to zero never carries a sign.

Code
import { Money, formatMoney, useLanguage, type MoneyDisplay } from '@ergasti/bricks';

const cell = { padding: '6px 14px 6px 0', textAlign: 'start' as const };

function CurrencyAndSign() {
  const language = useLanguage();
  const rows: Array<[string, MoneyDisplay]> = [
    ['{}', {}],
    ['{ showCurrency: false }', { showCurrency: false }],
    ["{ sign: 'always' }", { sign: 'always' }],
    ["{ showCurrency: false, sign: 'always' }", { showCurrency: false, sign: 'always' }],
  ];
  return (
    <table style={{ borderCollapse: 'collapse' }}>
      <thead><tr><th style={cell} scope="col">Options</th><th style={cell} scope="col">Money in</th><th style={cell} scope="col">Money out</th></tr></thead>
      <tbody>
        {rows.map(([name, money]) => (
          <tr key={name}>
            <th style={cell} scope="row"><code>{name}</code></th>
            <td style={cell}>{formatMoney('250000.00', { language, ...money })}</td>
            <td style={cell}>{formatMoney('-27645.00', { language, ...money })}</td>
          </tr>
        ))}
      </tbody>
    </table>
  );
}

With no currency word configured (the generic core has none; trndrPreset gives EGP / ج.م) showCurrency: true has no word to draw and the figure is shown alone. Set a currency on the provider: see The provider and presets.

Where it is set

Four levels, and the most specific one that sets a field wins that field:

  1. the component's own money prop;
  2. BricksProvider moneyFor for one slot, app-wide;
  3. BricksProvider money for every figure;
  4. the slot's built-in default (the table below).

Fields combine: a component that sets only compact still gets showCurrency and decimals from the levels under it. A nested provider merges its money and moneyFor over its parent's, field by field. A provider given a preset starts again from that preset's own money and moneyFor.

<BricksProvider
  preset={trndrPreset}
  money={{ decimals: 0 }}                                  // every figure: whole units
  moneyFor={{ 'walletLedger.entry': { showCurrency: true } }} // except the ledger's entries
>
  <WalletLedger groups={groups} balance="61840.00" money={{ balance: { compact: true } }} />
</BricksProvider>

Resolution order

One figure, four layers. Each row adds a layer; the most specific one that sets a field wins it. Nothing set: the slot's default. moneyFor names one slot app-wide; money is for everything; the component's own prop is last word. The last figure sets compact on the component and gets its other fields from the layers below.

Code
import { BricksProvider, Money, useMoneyDisplay, type MoneyDisplay } from '@ergasti/bricks';

const cell = { padding: '6px 14px 6px 0', textAlign: 'start' as const };

function ResolutionOrder() {
  const Row = ({ label, children }: { label: string; children: React.ReactNode }) => (
    <tr><th style={cell} scope="row">{label}</th><td style={cell}>{children}</td></tr>
  );
  const Probe = ({ own }: { own?: MoneyDisplay }) => {
    const resolved = useMoneyDisplay('money', own);
    const fields = Object.entries(resolved).map(([k, v]) => `${k}: ${JSON.stringify(v)}`).join(', ');
    return <><Money value="184300.50" slot="money" money={own} /><br /><small className="kit-muted">{fields}</small></>;
  };
  return (
    <table style={{ borderCollapse: 'collapse' }}>
      <tbody>
        <Row label="Slot default"><Probe /></Row>
        <Row label="Provider money"><BricksProvider money={{ decimals: 0 }}><Probe /></BricksProvider></Row>
        <Row label="+ moneyFor[slot]"><BricksProvider money={{ decimals: 0 }} moneyFor={{ money: { showCurrency: false, decimals: 'auto' } }}><Probe /></BricksProvider></Row>
        <Row label="+ component prop"><BricksProvider money={{ decimals: 0 }} moneyFor={{ money: { showCurrency: false, decimals: 'auto' } }}><Probe own={{ compact: true }} /></BricksProvider></Row>
      </tbody>
    </table>
  );
}

Because the provider's money sits above the slot defaults, setting money={{ decimals: 2 }} also overrides the slots that default to 'auto' or to no currency (the hero's big figure, the ledger's entries). When you only mean one place, use moneyFor or the component's money prop.

A provider-wide setting

Three lines on BricksProvider change every figure below it: money for all of them, moneyFor for single slots. Here whole units, no cents, and the hero's balance row compact. A nested provider merges field by field over its parent.

Code
import { BricksProvider, HeroCard, MoneyNotesProvider, useLanguage, type WalletFigures } from '@ergasti/bricks';
import { moneyNotes } from './sample-data';

const figures: WalletFigures = { available: '43390.45', balance: '61840.00', held: '18450.00', toppedUp: '287800.00', lastTopup: '250000.00', leftPercent: 17, low: true };

function ProviderWide() {
  const language = useLanguage();
  return (
    <MoneyNotesProvider notes={moneyNotes(language)}>
      <div style={{ display: 'grid', gap: 20, gridTemplateColumns: 'repeat(auto-fit, minmax(300px, 1fr))' }}>
        <div>
          <p className="kit-muted">No settings</p>
          <HeroCard compact figures={figures} actions={null} />
        </div>
        <div>
          <p className="kit-muted"><code>money={'{{ decimals: 0 }}'}</code> and <code>moneyFor={'{{ \'heroCard.row\': { compact: true } }}'}</code></p>
          <BricksProvider money={{ decimals: 0 }} moneyFor={{ 'heroCard.row': { compact: true } }}>
            <HeroCard compact figures={figures} actions={null} />
          </BricksProvider>
        </div>
      </div>
    </MoneyNotesProvider>
  );
}

Slots

A slot is one place the library draws money itself, named component.slot. moneyFor takes slot names as keys and the MoneySlot type checks them, so a typo is a compile error. A component with one slot takes a plain MoneyDisplay as its money prop. A component with several (WalletLedger, HeroCard, ChallengeDetail, PayoutBatchDetail, BundlePurchaseSummary, TopUpAmountPicker, CreatorProfilePanel) takes an object keyed by the part after the dot, and MoneySlotsOf<'walletLedger'> is its type ({ total?, entry?, balance? }). The PR column presets (brandColumns, payoutColumns, topUpColumns, fraudColumns, challengeColumns) take it as their last argument.

The table below is generated from MONEY_SLOTS in the library source, with the defaults resolved and each row rendered by formatMoney.

42 slots. "Default" lists what the slot sets over the preset default (showCurrency: true, decimals: 2, compact: false, sign: 'negative'). "Looks like" is -27645.00 and 250000.00 through the library's own formatMoney, in English.

Slot (moneyFor key)DefaultLooks like
moneyMoney itself (a bare <Money> a caller renders): "EGP 1,234.50".Set with money and slotpreset default− EGP 27,645.00EGP 250,000.00
moneyFigure.amountMoneyFigure's amount.Set with moneypreset default− EGP 27,645.00EGP 250,000.00
moneyNote.amountThe amount at the top of a MoneyNote popover.Set with moneypreset default− EGP 27,645.00EGP 250,000.00
heroCard.bigHeroCard's big available figure: "EGP 43,390" (the word stays the small prefix; Arabic suffix).Set with money={{ big: … }}decimals: 'auto'− EGP 27,645EGP 250,000
heroCard.rowHeroCard's row: balance, held, topped up ("EGP 61,840.00").Set with money={{ row: … }}preset default− EGP 27,645.00EGP 250,000.00
walletLedger.totalWalletLedger's group totals: "− EGP 102,760.00", "+ EGP 250,000.00".Set with money={{ total: … }}sign: 'always'− EGP 27,645.00+ EGP 250,000.00
walletLedger.entryWalletLedger's entries: "− 27,645.00", "+ 250,000.00" (no currency word).Set with money={{ entry: … }}showCurrency: falsesign: 'always'− 27,645.00+ 250,000.00
walletLedger.balanceWalletLedger's "Balance now".Set with money={{ balance: … }}preset default− EGP 27,645.00EGP 250,000.00
walletHealthCard.lastTopupWalletHealthCard's "17% of EGP 250,000.00".Set with moneypreset default− EGP 27,645.00EGP 250,000.00
challengeCard.figuresChallengeCard's sales and commission: "EGP 184.3K".Set with moneycompact: true− EGP 27.6KEGP 250.0K
challengeDetail.figuresChallengeDetail's sales and commission paid: "EGP 27.6K".Set with money={{ figures: … }}compact: true− EGP 27.6KEGP 250.0K
challengeDetail.topCreatorsChallengeDetail's top creators' sales: "EGP 61.6K".Set with money={{ topCreators: … }}compact: true− EGP 27.6KEGP 250.0K
liveChallengeCard.figuresLiveChallengeCard's sales and commission.Set with moneycompact: true− EGP 27.6KEGP 250.0K
findCreatorCard.sales90FindCreatorCard's "Sold · 90 days": "EGP 212.0K".Set with moneycompact: true− EGP 27.6KEGP 250.0K
creatorProfilePanel.sales90CreatorProfilePanel's "Sold · 90 days" tile: "EGP 212.0K".Set with money={{ sales90: … }}compact: true− EGP 27.6KEGP 250.0K
creatorProfilePanel.averageOrderCreatorProfilePanel's average order fact: "EGP 270.00".Set with money={{ averageOrder: … }}preset default− EGP 27,645.00EGP 250,000.00
myCreatorPanel.figuresMyCreatorPanel's sales and commission.Set with moneycompact: true− EGP 27.6KEGP 250.0K
groupCard.salesGroupCard's sales.Set with moneycompact: true− EGP 27.6KEGP 250.0K
groupPanel.salesGroupPanel's sales and each member's sales.Set with moneycompact: true− EGP 27.6KEGP 250.0K
payoutBatchDetail.totalPayoutBatchDetail's batch total.Set with money={{ total: … }}preset default− EGP 27,645.00EGP 250,000.00
payoutBatchDetail.linePayoutBatchDetail's paid-to lines.Set with money={{ line: … }}preset default− EGP 27,645.00EGP 250,000.00
topUpAmountPicker.presetTopUpAmountPicker's suggested-amount chips: "5,000" (the currency is in the legend).Set with money={{ preset: … }}showCurrency: falsedecimals: 'auto'− 27,645250,000
topUpAmountPicker.totalTopUpAmountPicker's available now / after the top-up.Set with money={{ total: … }}preset default− EGP 27,645.00EGP 250,000.00
bundleCard.priceBundleCard's price and price per video.Set with moneypreset default− EGP 27,645.00EGP 250,000.00
bundlePurchaseSummary.priceBundlePurchaseSummary's bundle price.Set with money={{ price: … }}preset default− EGP 27,645.00EGP 250,000.00
bundlePurchaseSummary.totalBundlePurchaseSummary's wallet available now and after.Set with money={{ total: … }}preset default− EGP 27,645.00EGP 250,000.00
brandDetail.figuresPR BrandDetail's wallet figures.Set with moneypreset default− EGP 27,645.00EGP 250,000.00
challengeSummary.figuresPR ChallengeSummary's money facts.Set with moneypreset default− EGP 27,645.00EGP 250,000.00
challengeColumns.figuresPR challengeColumns' sales and commission cells.Set with moneypreset default− EGP 27,645.00EGP 250,000.00
fraudCaseDetail.figuresPR FraudCaseDetail's held amount and order commissions.Set with moneypreset default− EGP 27,645.00EGP 250,000.00
fraudCaseRow.figuresPR FraudCaseRow / fraudCaseColumns amount.Set with moneypreset default− EGP 27,645.00EGP 250,000.00
leaderboard.figuresPR Leaderboard's sales.Set with moneypreset default− EGP 27,645.00EGP 250,000.00
challengeRequestColumns.budgetPR challengeRequestColumns' budget: "EGP 10,000" (cents only when non-zero).Set with moneydecimals: 'auto'− EGP 27,645EGP 250,000
prCreatorColumns.salesPR prCreatorColumns' all-time sales: "EGP 10,000" (cents only when non-zero).Set with moneydecimals: 'auto'− EGP 27,645EGP 250,000
presets.figuresPR column presets' money cells (brands, payouts, top-ups).Set with moneypreset default− EGP 27,645.00EGP 250,000.00
tierLadder.figuresPR TierLadder's sales thresholds.Set with moneypreset default− EGP 27,645.00EGP 250,000.00
customerAffiliates.figuresPR CustomerAffiliatesCard's "Their sales" (v3: programs).Set with moneypreset default− EGP 27,645.00EGP 250,000.00
prChallengeCard.figuresPR PrChallengeCard's budget held and top-three sales (v3: programs).Set with moneypreset default− EGP 27,645.00EGP 250,000.00
creatorDrawer.figuresPR PrCreatorDrawer's all-time sales.Set with moneypreset default− EGP 27,645.00EGP 250,000.00
creatorColumns.figuresPR creatorColumns' all-time sales cell.Set with moneypreset default− EGP 27,645.00EGP 250,000.00
challengeGiftPicker.figuresPR ChallengeGiftPicker's cost per gift.Set with moneypreset default− EGP 27,645.00EGP 250,000.00
brandRequestCard.figuresPR BrandRequestCard's requested budget.Set with moneypreset default− EGP 27,645.00EGP 250,000.00

MONEY_SLOTS

constant

Every place the library renders money itself, as component.slot, with the slot's built-in default (laid over MONEY_DISPLAY_DEFAULT). The keys are what BricksProvider moneyFor takes; a component's own money prop takes the part after the dot (or a plain MoneyDisplay when the component has one slot). money is the kit's Money itself. The defaults reproduce the brand dashboard's screenshots: only walletLedger.entry differs from 0.1.0 (no currency).

const MONEY_SLOTS: { readonly money: {}; readonly 'moneyFigure.amount': {}; readonly 'moneyNote.amount': {}; readonly 'heroCard.big': { readonly decimals: "auto"; }; readonly 'heroCard.row': {}; readonly 'walletLedger.total': { readonly sign: "always"; }; readonly 'walletLedger.entry': { readonly showCurrency: false; readonly sign: "always"; }; readonly 'walletLedger.balance': {}; readonly 'walletHealthCard.lastTopup': {}; readonly 'challengeCard.figures': { readonly compact: true; }; readonly 'challengeDetail.figures': { readonly compact: true; }; readonly 'challengeDetail.topCreators': { readonly compact: true …

Source: src/lib/moneyDisplay.ts (line 15)

WalletLedger's entries show no currency word and always carry a sign, as in the screenshots ("− 27,645.00", "+ 250,000.00"); 0.1.0 wrote "− EGP 27,645.00". To keep the old look, set the slot (below, the same ledger twice):

Ledger with and without the currency

The first ledger is the default: no currency word on its entries. The second sets money={{ entry: { showCurrency: true } }}, the 0.1.0 look. A multi-slot component takes money keyed by its slots (total, entry, balance).

Code
import { useState } from 'react';
import { MoneyNotesProvider, WalletLedger, useLanguage, type LedgerView } from '@ergasti/bricks';
import { blocksData, moneyNotes } from './sample-data';

function LedgerWithAndWithoutCurrency() {
  const language = useLanguage();
  const [view, setView] = useState<LedgerView>('flat');
  const groups = blocksData.LEDGER(language, () => {});
  return (
    <MoneyNotesProvider notes={moneyNotes(language)}>
      <div style={{ display: 'grid', gap: 20 }}>
        <div>
          <p className="kit-muted">Default (<code>entry</code>: no currency)</p>
          <WalletLedger groups={groups} balance="61840.00" view={view} onViewChange={setView} />
        </div>
        <div>
          <p className="kit-muted"><code>money={'{{ entry: { showCurrency: true } }}'}</code></p>
          <WalletLedger groups={groups} balance="61840.00" view={view} onViewChange={setView} money={{ entry: { showCurrency: true } }} />
        </div>
      </div>
    </MoneyNotesProvider>
  );
}

Resolving a slot yourself

For a figure of your own that should follow the same rules (a cell in your own table, a line in a sentence), ask for its slot and pass the result on:

  • useMoneyDisplay(slot, own?) reads the provider and returns every field set. Give it to <Money money={…}> or to formatMoney.
  • resolveMoneyDisplay(slot, { money, moneyFor }, own?) is the same function without a hook, for code that has the provider's values already.
  • formatMoney(value, options) is the one formatter and takes language, currency and every MoneyDisplay field. moneyParts(value, display) returns the sign and the digits without the currency word, for a component that places the word itself (the hero's small prefix).
function PaidCell({ amount }: { amount: string }) {
  const display = useMoneyDisplay('payoutBatchDetail.line');
  return <Money value={amount} money={display} />;
}

useMoneyDisplay

hook

One money slot's display options, every field set, the most specific winning: own (the component's money prop) → the provider's moneyFor[slot] → its money → the slot's default (MONEY_SLOTS). Pass the result to <Money money> or formatMoney.

function useMoneyDisplay(slot: "money" | "moneyFigure.amount" | "moneyNote.amount" | "heroCard.big" | "heroCard.row" | "walletLedger.total" | "walletLedger.entry" | "walletLedger.balance" | "walletHealthCard.lastTopup" | "challengeCard.figures" | "challengeDetail.figures" | "challengeDetail.topCreators" | "liveChallengeCard.figures" | "findCreatorCard.sales90" | "creatorProfilePanel.sales90" | "creatorProfilePanel.averageOrder" | "myCreatorPanel.figures" | "groupCard.sales" | "groupPanel.sales" | "payoutBatchDetail.total" | "payoutBatchDetail.line" | "topUpAmountPicker.preset" | "topUpAmountPicker.total" | "bundleCard.price" | "bundlePurchaseSummary.price" | "bundlePurchaseSummary.total" | "brandDetail.figures" | "challengeSummary.figures" | "challengeColumns.figures" | "fraudCaseDetail.figures" | "fraudCaseRow.figures" | "leaderboard.figures" | "challengeRequestColumns.budget" | "prCreatorColumns.sales" | "presets.figures" | "tierLadder.figures" | "customerAffiliates.figures" | "prChallengeCard.figures" | "creatorDrawer.figures" | "creatorColumns.figures" | "challengeGiftPicker.figures" | "brandRequestCard.figures", own?: MoneyDisplay | undefined): Required<MoneyDisplay>

Prop

Type

Source: src/kit/BricksProvider.tsx (line 65)

resolveMoneyDisplay

function

One slot's display, the most specific winning: own (the component's money prop) → moneyFor[slot] → money (the provider's) → the slot's default → MONEY_DISPLAY_DEFAULT.

function resolveMoneyDisplay(slot: "money" | "moneyFigure.amount" | "moneyNote.amount" | "heroCard.big" | "heroCard.row" | "walletLedger.total" | "walletLedger.entry" | "walletLedger.balance" | "walletHealthCard.lastTopup" | "challengeCard.figures" | "challengeDetail.figures" | "challengeDetail.topCreators" | "liveChallengeCard.figures" | "findCreatorCard.sales90" | "creatorProfilePanel.sales90" | "creatorProfilePanel.averageOrder" | "myCreatorPanel.figures" | "groupCard.sales" | "groupPanel.sales" | "payoutBatchDetail.total" | "payoutBatchDetail.line" | "topUpAmountPicker.preset" | "topUpAmountPicker.total" | "bundleCard.price" | "bundlePurchaseSummary.price" | "bundlePurchaseSummary.total" | "brandDetail.figures" | "challengeSummary.figures" | "challengeColumns.figures" | "fraudCaseDetail.figures" | "fraudCaseRow.figures" | "leaderboard.figures" | "challengeRequestColumns.budget" | "prCreatorColumns.sales" | "presets.figures" | "tierLadder.figures" | "customerAffiliates.figures" | "prChallengeCard.figures" | "creatorDrawer.figures" | "creatorColumns.figures" | "challengeGiftPicker.figures" | "brandRequestCard.figures", options2: { money?: MoneyDisplay; moneyFor?: MoneyFor; }, own?: MoneyDisplay | undefined): Required<MoneyDisplay>

options2: { money?: MoneyDisplay; moneyFor?: MoneyFor; } (required)

Prop

Type

Source: src/lib/moneyDisplay.ts (line 131)

moneyParts

function

A 2-dp money string split into its sign and digits for display (the currency word left out), or null for a missing or invalid value: for a component that places the currency word itself (HeroCard's small prefix).

function moneyParts(value: string | null | undefined, options2?: MoneyDisplay): MoneyParts | null

options2: MoneyDisplay

Prop

Type

Source: src/lib/format.ts (line 103)

A custom currency.format on the provider (a MoneyFormatter) receives the same resolved options plus the language, so it can honour compact, decimals, showCurrency and sign or ignore the ones it cannot. formatAmount is deprecated: it is formatMoney(value, { language, showCurrency: false, decimals: 'auto' }).

Note variants

A MoneyNote that wraps a label can be drawn three ways. The note stays reachable by keyboard and screen reader in all of them.

variantLooks like
'term' (default)The label dotted-underlined.
'plain'The label as plain text that still opens the note. The screenshots use this for "Topped up in total", "Sold · 90 days" and the profile's figure captions.
'icon'Plain label with the small "?" after it.

variant on one MoneyNote wins; BricksProvider moneyNoteStyle sets it for every labelled note below.

Note variants

MoneyNote with a label has three looks: 'term' (default, dotted underline), 'plain' (plain text that still opens the note) and 'icon' (plain text with the small "?" after it). In each the note opens on press, hover and focus and is read by a screen reader. BricksProvider moneyNoteStyle sets the look for a subtree.

Code
import { BricksProvider, MoneyFigure, MoneyNote, MoneyNotesProvider, useLanguage } from '@ergasti/bricks';
import { moneyNotes } from './sample-data';

function NoteVariants() {
  const language = useLanguage();
  return (
    <MoneyNotesProvider notes={moneyNotes(language)}>
      <div style={{ display: 'grid', gap: 12, paddingTop: 70 }}>
        <span><MoneyNote figure="wallet_available" variant="term">Available now</MoneyNote> <code className="kit-muted">variant="term"</code></span>
        <span><MoneyNote figure="wallet_available" variant="plain">Available now</MoneyNote> <code className="kit-muted">variant="plain"</code></span>
        <span><MoneyNote figure="wallet_available" variant="icon">Available now</MoneyNote> <code className="kit-muted">variant="icon"</code></span>
        <BricksProvider moneyNoteStyle="icon">
          <span><MoneyFigure figure="wallet_held" amount="18450.00" /> <code className="kit-muted">moneyNoteStyle="icon" on the provider</code></span>
        </BricksProvider>
      </div>
    </MoneyNotesProvider>
  );
}

MoneyNote

component

The "?" note beside a money figure, or a dotted-underlined term when you give it children. It opens a small popover (on click, hover or focus) with what the figure includes and excludes, read from the page's money-notes dictionary (MoneyNotesProvider). The popover closes on Escape and returns focus to the trigger.

Source: src/kit/MoneyNote.tsx (line 104)

On this page