mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-07-07 22:18:39 +00:00
36 lines
1.0 KiB
TypeScript
36 lines
1.0 KiB
TypeScript
"use client"
|
|
|
|
import {
|
|
AlertDialog,
|
|
AlertDialogAction,
|
|
AlertDialogCancel,
|
|
AlertDialogContent,
|
|
AlertDialogDescription,
|
|
AlertDialogFooter,
|
|
AlertDialogHeader,
|
|
AlertDialogTitle,
|
|
} from "@/examples/base/ui/alert-dialog"
|
|
|
|
import { useReset } from "@/app/(create)/hooks/use-reset"
|
|
|
|
export function ResetDialog() {
|
|
const { showResetDialog, setShowResetDialog, confirmReset } = useReset()
|
|
|
|
return (
|
|
<AlertDialog open={showResetDialog} onOpenChange={setShowResetDialog}>
|
|
<AlertDialogContent size="sm">
|
|
<AlertDialogHeader>
|
|
<AlertDialogTitle>Reset to defaults?</AlertDialogTitle>
|
|
<AlertDialogDescription>
|
|
This will reset all customization options to their default values.
|
|
</AlertDialogDescription>
|
|
</AlertDialogHeader>
|
|
<AlertDialogFooter>
|
|
<AlertDialogCancel>Cancel</AlertDialogCancel>
|
|
<AlertDialogAction onClick={confirmReset}>Reset</AlertDialogAction>
|
|
</AlertDialogFooter>
|
|
</AlertDialogContent>
|
|
</AlertDialog>
|
|
)
|
|
}
|