Design system / Molecules
Molecule / Member management
MemberFeedback
MemberFeedback presents supplied errors as alerts and optional notices as status text in standalone fields and the modal directory. MemberManager renders invitation outcomes separately in an Invitation result success box under the drawer counts.
Live example
Current component with fictional data. Example changes are not persisted.
Example failure: your draft is kept.
2 invitees added. 1 person already existed in this list. No duplicate invitees were added. Existing reviewers' category assignments remain unchanged.
Fictional result only. No requests were sent.
Responsibility
Error and notice text form one feedback concern shared by the invitation field and directory. Request policy remains with the instance hook.
Public contract
The table describes supported inputs, exported parts and caller responsibilities. A callback supplies a command, such as saving a draft. These notes are maintained manually; check current source types before integration.
| Prop / part | Type | Requirement | Responsibility |
|---|---|---|---|
| error / notice | string | null | Optional | Owner-supplied failure or outcome copy. |
| errorId | string | Optional | Connect the visible error to its field's aria-describedby. |
API notes are curated documentation, not generated types. The source linked above is the current implementation; update these notes alongside API changes.
State and behavior
Identify which values the caller controls and which behavior the component or underlying primitive owns. A local example does not supply persistence, authorization or a complete product lifecycle.
No effects or requests. Errors use role=alert; notices use role=status. Owners keep invitation feedback separate from directory removal/category/exclusion feedback. A hidden background instance is excluded by the modal's accessibility boundary.
Dependencies
- Text
Token and styling contract
These notes identify theme roles, utilities and direct style values used by the source. Direct colors or timings are implementation exceptions, not recommendations to bypass the theme.
border-destructive/30 / bg-destructive/10 / text-destructive- Existing semantic error treatment.
text-supporting / leading-compact- Text atom controls fluid size and compact rhythm.
Boundaries and limitations
- Does not invent success, classify network outcomes or clear a draft.
- Callers must use authoritative results and retain failed input.
Where to make a change
Change shared feedback presentation here; change transport/domain error copy in the owning feature hook.
Selected real uses
MemberInvitationField
The field connects its error ID to the textarea description.
src/components/members/member-invitation-field.tsxMemberDirectorySheet
Visible modal feedback keeps row-action failures within the active interaction context.
src/components/members/memberDirectorySheet.tsxThese traces describe selected uses, not every dependency. Repository-only paths are shown as references; only approved files have public source views.
Usage contract
<MemberFeedback error={error} notice={notice} errorId={errorId} />Illustrative consumer bindings, not a self-contained product workflow. Live examples supply only local state or explicit fictional props.