Skip to main content

Button Groups

All button groups live in src/lib/ui/buttongroups/. They compose the button primitives from buttons/ into context-specific sets with pre-wired logic.

Generic / layout

ComponentFilePurpose
ButtonStackButtonStack.tsxFlexible MUI Stack that renders any mix of button types from a config array. Supports horizontal and vertical layouts, shared sizing, and per-item sx. The entry point for building ad-hoc button rows.
ApplyCancelButtonsApplyCancelButtons.tsxApply + Cancel pair. The cancel button shows a discard-confirmation dialog when hasChanges is true. Accepts a loading prop that disables both buttons during form submission.
HoldCancelButtonsHoldCancelButtons.tsxButtonHoldRaw + Cancel side by side. Designed for DialogActions where a destructive confirmation requires a hold gesture.
twoButtonToasttwoButtonToast.tsxToast notification component with two action buttons and a warning icon, rendered inside a Paper card. Used to surface recoverable errors with inline actions.

Feature-specific

ComponentFileContext
ActivitiesGridButtonsActivitiesGridButtons.tsxActivity list page. Four buttons: Create Activity, Edit/Delete OU, Create OU, Download ROPA PDF (demo-restricted).
EditActivityButtonsEditActivityButtons.tsxActivity editor toolbar. Save, Delete (hold), Cancel, and an expand button for publication and information-method sub-actions.
EditActivityMultiValuedButtonsEditActivityMultiValuedButtons.tsxMulti-valued attribute editor. Apply + Cancel with validation that requires at least one value unless editing org defaults.
NewActivityButtonsNewActivityButtons.tsxNew activity form footer. Create (with confirmation) + Discard, with contextual tooltips when the form is incomplete.
ShowActivityButtonsShowActivityButtons.tsxActivity viewer. View as HTML, Download as PDF, Close.
ContractsGridButtonsContractsGridButtons.tsxContracts data grid. Add Contract + Close.
PartnersGridButtonsPartnersGridButtons.tsxPartners data grid. Add Partner + Close.
OrganizationDetailsButtonsOrganizationDetailsButtons.tsxOrg details form. Save, Delete (hold, hidden for new orgs), Cancel.
OuFormButtonsOuFormButtons.tsxOU form. Create/Update + Delete (hold, conditional on activity state) + Cancel, with tooltip validation messages.
TemplateEditorButtonsTemplateEditorButtons.tsxTemplate editor. Validate, Delete (hold, optional), Close. Buttons adjust based on hasChanges and canDelete.
TemplatesCaptionButtonsTemplatesCaptionButtons.tsxTemplates list caption. Expand buttons for org-level and activity-level template types, each with multiple sub-options.
TemplateValidationButtonsTemplateValidationButtons.tsxTemplate validation flow. Return to Edit + Sanitize or Save, with conditional rendering based on whether the template has issues and whether it is new.