BrandRequestCard
A brand's challenge request under review (v3 mock P.request's main card): "What the brand asked for" with its status, the dates, budget and reward side by side, the brand's message quoted, what approving means, and "Reject with reason" / "Approve and build". The wallet and gift stock beside it are the app's own cards (SummarySection lines).
import { BrandRequestCard } from '@ergasti/bricks';Examples
Brand request
What a brand asked for (dates, budget, reward), its message, and Reject with reason / Approve and build.
Code
import { BrandRequestCard } from '@ergasti/bricks';
function Request() {
return (
<div style={{ maxWidth: 820 }}>
<BrandRequestCard dates="1–31 Dec" budget="15000.00" reward="Cash" money={{ decimals: 'auto' }} onReject={() => {}} onApprove={() => {}}
message="We want to push our winter line before New Year. Happy to go up to 15,000." />
</div>
);
}A decision that failed
error shows a red alert above the buttons (true: "Couldn’t save your decision."), with Try again when you pass onRetry.
Code (not run)
import { BrandRequestCard } from '@ergasti/bricks';
function Failed() {
return (
<div style={{ maxWidth: 820 }}>
<BrandRequestCard dates="1–31 Dec" budget="15000.00" reward="Cash" money={{ decimals: 'auto' }} onReject={() => {}} onApprove={() => {}} error onRetry={() => {}} />
</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 prBrandRequest, or with the component's own prop where it has one. A {name} is a value the component fills in.
| Key | English | Arabic |
|---|---|---|
title | What the brand asked for | البراند طلب إيه |
dates | Dates | التواريخ |
budget | Budget | الميزانية |
reward | Reward | الجايزة |
message | The brand’s message | رسالة البراند |
note | Once you approve, the challenge is yours: you build it, pick the creators and manage it to the end. | لما توافق، التحدي يبقى بتاعك: إنت اللي تبنيه وتختار صنّاع المحتوى وتتابعه للآخر. |
reject | Reject with reason | ارفض مع السبب |
approve | Approve and build | وافق وابني |
working | Working… | لحظة… |
error | Couldn’t save your decision. | مقدرناش نحفظ قرارك. |
retry | Try again | جرّب تاني |
Design guidance
How the BRICKS design system uses BrandRequestCard. Written in docs/content/components/BrandRequestCard.md; the props above are read from the code, which wins where the two disagree.
A brand's challenge request under PR review: "What the brand asked for" with its status, the dates, budget and reward side by side, the brand's message quoted, what approving means, and "Reject with reason" / "Approve and build"; use it as the main card of the request page.
It is the v3 PR mock's P.request main card. The wallet and gift stock beside it are the app's own cards (SummarySection without a title). Approving opens the challenge builder pre-filled from the request; rejecting opens the app's ReasonDialog.
Anatomy
- Card (
<section class="kit-card kit-pr-req">, labelled by its title). - Head: "What the brand asked for" (
h2) and aPrStatusPill(defaultneeds_review). - Facts (
<dl>, three columns; one on phones): Dates, Budget (aMoneyNoteterm) and Reward; 12px labels over 14px bold values. - Message (
<blockquote>, soft, radius 16): the brand's own words in quotes, isolated. - Note (12.5px muted): "Once you approve, the challenge is yours: you build it, pick the creators and manage it to the end."
- Actions: "Reject with reason" (outline) and "Approve and build →" (ink; the arrow flips in RTL).
Variants
| Props | Look |
|---|---|
| cash request | Reward "Cash", budget "EGP 15,000". |
| gift request | Dates "Dates set by TRNDR", reward "Gift" (story GiftRequest). |
no message | No quote. |
| no handlers | No actions (read-only). |
status | Any PR status key. |
States
| State | How |
|---|---|
| Default | — |
| Working | busy: both disabled, Approve reads "Working…" with aria-busy. |
Types
PrBrandRequestCopy (labels): title, dates, budget, reward, message, note, reject, approve, working, and the optional error, retry.
Usage
import { useState } from 'react';
import { BrandRequestCard, Card, SummaryLine, SummarySection } from '@ergasti/bricks';
export function RequestPage({ approveAndBuild }: { approveAndBuild: () => Promise<void> }) {
const [approving, setApproving] = useState(false);
const [reasonOpen, setReasonOpen] = useState(false);
return (
<div className="scr-grid scr-grid--84">
<BrandRequestCard
dates="1–31 Dec"
budget="15000.00"
reward="Cash"
message="We want to push our winter line before New Year. Happy to go up to 15,000."
money={{ decimals: 'auto' }}
busy={approving}
onReject={() => setReasonOpen(true)}
onApprove={async () => { setApproving(true); await approveAndBuild(); setApproving(false); }}
/>
<Card title="Glow Lab wallet">
<SummarySection>
<SummaryLine label="Available" amount="43390.00" figure="wallet_available" />
<SummaryLine label="Held for orders" amount="18450.00" figure="wallet_held" />
</SummarySection>
</Card>
</div>
);
}Where it appears
- PR Portal › Challenges › a brand's request (the request page main card). Screens: PR · Brand request; the requests list: PR · Challenges · Brand requests.
Guidelines
Do
- Quote the brand's message exactly.
- Always ask for a reason on Reject.
- Set
busywhile approving.
Don't
- Don't edit the request here; approve opens the builder for changes.
RTL and Arabic
- Facts and actions mirror; the arrow flips. "البراند طلب إيه", "ارفض مع السبب", "وافق وابني".
Tokens
--ink-3, --soft; card and button tokens.
Accessibility
- A labelled
<section>; facts are a<dl>; the quote is a<blockquote>named "The brand's message". - Status pill in words; the arrow icon is
aria-hidden.
Found in the source
- ARIA attributes set:
aria-labelledby,aria-label,aria-busy,aria-hidden.
Read from the component's source and tests. See Accessibility for the patterns the library follows.
Related
ChallengeSummary,SummarySection: the builder's review.ReasonDialog,challengeRequestColumns.
See also: Button · Money · MoneyNote · useLanguage · PrIcon · PrStatusPill · BuilderStepCard · ChallengeAudienceFields · ChallengeBasicsFields · ChallengeGiftPicker
Source
src/pr/challenges/BrandRequestCard.tsx (line 74) on GitHub.