AdminSettingsPanel
ImplementedCard panel for admin settings sections with a titled header, a body slot, and an optional right-aligned footer action bar.
components/organisms/AdminSettingsPanel/AdminSettingsPanel.tsxCard panel for admin settings sections — a titled header, a body slot for the form, and an optional right-aligned footer action bar (Save/Cancel).
AdminSettingsPanel
Organism — Admin family
Card section named by its h2 (aria-labelledby): a titled header with optional description, a padded flex-1 body slot for the settings form, and an optional footer bar where actions render right-aligned in a bordered strip. Layout chrome only — form state, validation and submit stay at the call site.
Taxes et expédition
Configuration des taux de taxe et des frais d'expédition par province.
This component supports light and dark mode.
Usage
Wrap a settings form in children and put the Save/Reset/Cancel controls in the footer slot — they render right-aligned in a bordered bar; push left-only content (errors, "Saved." flashes) with className="mr-auto" on the first left item. One concern per panel — a settings page composes several.
import { AdminSettingsPanel, Button, FormFieldError } from '@epasslive/design-system'
<AdminSettingsPanel
title={locale === 'fr' ? 'Taxes et expédition' : 'Tax & Shipping'}
description={locale === 'fr'
? 'Configuration des taux de taxe et des frais d\'expédition par province.'
: 'Tax rates and shipping costs configuration by province.'}
locale={locale}
footer={
<>
{form.error && <FormFieldError message={form.error} className="mr-auto" />}
<Button variant="secondary" onClick={form.reset} disabled={form.saving}>
{locale === 'fr' ? 'Réinitialiser' : 'Reset'}
</Button>
<Button onClick={form.save} disabled={form.saving}>
{locale === 'fr' ? 'Enregistrer' : 'Save'}
</Button>
</>
}
>
<TaxTabs form={form} locale={locale} />
</AdminSettingsPanel>Conventions
locale is required but currently unused in render — pass your active locale so future translated chrome lights up without a breaking change. Mirror the TaxConfigForm shape: destructive Reset before primary Save, both disabled while saving, and announced errors via FormFieldError (pushed left with mr-auto).
Accessibility
The section is named by its heading via aria-labelledby (WCAG 1.3.1 / 4.1.2 — the h2 id is derived from id). The footer is a structural <footer> element within the section; action semantics (disabled states, live error text) come from the slot content — compose FormFieldError for announced validation messages.
Props
title*stringPanel heading — rendered as the section's h2 and its accessible name.
descriptionstringSecondary line under the title (what this section configures).
footerReact.ReactNodeAction bar slot — renders right-aligned in a bordered footer strip.
locale*"en" | "fr"Reserved for translated chrome strings (currently unused in render).
children*React.ReactNodePanel body — the settings form (fields, tabs, toggles).
classNamestringClass on the card section.
idstringStable id (defaults to a React useId-derived id, unique per instance).
Props
AdminSettingsPanel
titlestring—Panel heading — rendered as the section's h2 and its accessible name.
descriptionstring—Secondary line under the title (what this section configures).
footerReact.ReactNode—Action bar slot — renders right-aligned in a bordered footer strip (Save/Reset/Cancel; push left-only status flashes with mr-auto).
locale"en" | "fr"—Reserved for translated chrome strings (required but currently unused in render) — pass the active locale so future chrome lights up without a breaking change.
childrenReact.ReactNode—Panel body — the settings form (fields, tabs, toggles).
classNamestring—Additional classes merged onto the card <section>.
idstringuseId-derivedStable id for the section + heading (defaults to a React useId-derived id, unique per instance).
<AdminSettingsPanel />Accessibility
Type
1 ruleARIA
1 ruleUsage
Import
import { AdminSettingsPanel } from "@epasslive/design-system"Example 1
<AdminSettingsPanel title={locale === "fr" ? "Taxes et expédition" : "Tax & Shipping"} locale={locale} footer={<Button onClick={save}>Enregistrer</Button>}><TaxTabs /></AdminSettingsPanel>Anti-patterns
— Do not fetch data directly in organisms
— Avoid tight coupling to specific data sources