Skip to main content

StatusActivationModal

A specialised confirmation dialog for toggling entity status (active ↔ inactive). Presents context-aware copy (activate vs deactivate) based on the current status.

πŸ“– Storybook

Preview​

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​

PropTypeDefaultDescription
openbooleanβ€”Controls visibility
onClose() => voidβ€”Cancel handler
onConfirm(newStatus: boolean) => void | Promise<void>β€”Called with the new status value
currentStatusbooleanβ€”The entity's current active state
entityNamestringβ€”Entity name displayed in the modal copy
isLoadingbooleanfalseDisables buttons and shows spinner
textOverrides{ activateTitle?: string; deactivateTitle?: string; confirmLabel?: string; cancelLabel?: string }β€”Custom copy