diff --git a/components/settings/unified/DangerZone.tsx b/components/settings/unified/DangerZone.tsx new file mode 100644 index 0000000..91f1dcb --- /dev/null +++ b/components/settings/unified/DangerZone.tsx @@ -0,0 +1,60 @@ +'use client' + +import { Button } from '@ciphera-net/ui' + +interface DangerZoneItem { + title: string + description: string + buttonLabel: string + /** 'outline' = bordered button (Reset Data style), 'solid' = red filled button (Delete style) */ + variant: 'outline' | 'solid' + onClick: () => void + disabled?: boolean +} + +interface DangerZoneProps { + items: DangerZoneItem[] + children?: React.ReactNode +} + +export function DangerZone({ items, children }: DangerZoneProps) { + return ( +
+
+

Danger Zone

+

Irreversible actions.

+
+ + {items.map((item) => ( +
+
+
+

{item.title}

+

{item.description}

+
+ {item.variant === 'outline' ? ( + + ) : ( + + )} +
+
+ ))} + + {children} +
+ ) +}