| 1 | import { AlertTriangle } from "lucide-react"; |
| 2 | |
| 3 | function DangerZone({ title |
| 4 | return ( |
| 5 | <div className="rounded-xl border border-destructive/30 bg-card overflow-hidden |
| 6 | <div className="flex items-center gap-2 border-b border-destructive/20 bg-destructive/5 px-4 py-3 |
| 7 | <AlertTriangle className=" |
| 8 | <p className="text-sm font-semibold text-destructive |
| 9 | </div> |
| 10 | <div className="divide-y divide-border |
| 11 | </div> |
| 12 | ); |
| 13 | } |
| 14 | |
| 15 | function DangerZoneRow({ |
| 16 | title, |
| 17 | description, |
| 18 | extra, |
| 19 | children, |
| 20 | }: { |
| 21 | title: string |
| 22 | description: string |
| 23 | extra?: React |
| 24 | children: React |
| 25 | }) { |
| 26 | return ( |
| 27 | <div className="flex items-center justify-between gap-4 px-4 py-4 |
| 28 | <div> |
| 29 | <p className="text-sm font-medium text-foreground |
| 30 | <p className="mt-0.5 text-xs text-muted-foreground |
| 31 | {extra} |
| 32 | </div> |
| 33 | {children} |
| 34 | </div> |
| 35 | ); |
| 36 | } |
| 37 | |
| 38 | export { DangerZone, DangerZoneRow |