ViewAppSheetDangerZone.tsx 744 B

1234567891011121314151617181920212223
  1. import { Alert, AlertDescription, AlertTitle, Button, CriticalIcon } from 'ui'
  2. interface ViewAppSheetDangerZoneProps {
  3. onDelete: () => void
  4. }
  5. export function ViewAppSheetDangerZone({ onDelete }: ViewAppSheetDangerZoneProps) {
  6. return (
  7. <div className="px-5 sm:px-6 py-6 space-y-3">
  8. <h3 className="text-sm font-medium text-foreground">Danger Zone</h3>
  9. <Alert variant="destructive">
  10. <CriticalIcon />
  11. <AlertTitle>Delete app</AlertTitle>
  12. <AlertDescription>Permanently delete this app and all its installations.</AlertDescription>
  13. <div className="mt-2">
  14. <Button type="danger" onClick={onDelete}>
  15. Delete app
  16. </Button>
  17. </div>
  18. </Alert>
  19. </div>
  20. )
  21. }