mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-07-08 22:45:47 +00:00
47 lines
1.3 KiB
TypeScript
47 lines
1.3 KiB
TypeScript
"use client"
|
|
|
|
import { Button } from "@/components/ui/button"
|
|
import {
|
|
Dialog,
|
|
DialogContent,
|
|
DialogDescription,
|
|
DialogFooter,
|
|
DialogHeader,
|
|
DialogTitle,
|
|
DialogTrigger,
|
|
} from "@/components/ui/dialog"
|
|
import { Input } from "@/components/ui/input"
|
|
import { Label } from "@/components/ui/label"
|
|
|
|
export function PresetSave() {
|
|
return (
|
|
<Dialog>
|
|
<DialogTrigger asChild>
|
|
<Button variant="subtle">Save</Button>
|
|
</DialogTrigger>
|
|
<DialogContent className="sm:max-w-[475px]">
|
|
<DialogHeader>
|
|
<DialogTitle>Save preset</DialogTitle>
|
|
<DialogDescription>
|
|
This will save the current playground state as a preset which you
|
|
can access later or share with others.
|
|
</DialogDescription>
|
|
</DialogHeader>
|
|
<div className="grid gap-4 py-4">
|
|
<div className="grid gap-2">
|
|
<Label htmlFor="name">Name</Label>
|
|
<Input id="name" autoFocus />
|
|
</div>
|
|
<div className="grid gap-2">
|
|
<Label htmlFor="description">Description</Label>
|
|
<Input id="description" />
|
|
</div>
|
|
</div>
|
|
<DialogFooter>
|
|
<Button type="submit">Save</Button>
|
|
</DialogFooter>
|
|
</DialogContent>
|
|
</Dialog>
|
|
)
|
|
}
|