StatusActivationModal
A specialised confirmation dialog for toggling entity status (active β inactive). Presents context-aware copy (activate vs deactivate) based on the current status.
π StorybookPreviewβ
Live previewβ Open in Storybook
Importβ
import { StatusActivationModal } from "@xocialive/ui-components";
Basic usageβ
<StatusActivationModal
open={open}
onClose={onClose}
currentStatus={entity.isActive}
onConfirm={async (newStatus) => {
await updateStatus(entity.id, newStatus);
onClose();
}}
entityName={entity.name}
/>
Propsβ
| Prop | Type | Default | Description |
|---|---|---|---|
open | boolean | β | Controls visibility |
onClose | () => void | β | Cancel handler |
onConfirm | (newStatus: boolean) => void | Promise<void> | β | Called with the new status value |
currentStatus | boolean | β | The entity's current active state |
entityName | string | β | Entity name displayed in the modal copy |
isLoading | boolean | false | Disables buttons and shows spinner |
textOverrides | { activateTitle?: string; deactivateTitle?: string; confirmLabel?: string; cancelLabel?: string } | β | Custom copy |