mirror of
https://github.com/lc-soft/LCUI.git
synced 2026-11-30 16:48:21 +01:00
38 lines
1010 B
TypeScript
38 lines
1010 B
TypeScript
import {
|
|
AlertDialog,
|
|
AlertDialogTrigger,
|
|
AlertDialogOverlay,
|
|
AlertDialogContent,
|
|
AlertDialogHeader,
|
|
AlertDialogTitle,
|
|
AlertDialogFooter,
|
|
AlertDialogCancel,
|
|
AlertDialogAction,
|
|
Text,
|
|
Portal,
|
|
} from "@lcui/react";
|
|
|
|
export default function Example() {
|
|
return (
|
|
<div className="flex flex-col gap-2">
|
|
<AlertDialog>
|
|
<AlertDialogTrigger>Confirm Changes</AlertDialogTrigger>
|
|
<Portal>
|
|
<AlertDialogOverlay>
|
|
<AlertDialogContent>
|
|
<AlertDialogHeader>
|
|
<AlertDialogTitle>Save changes?</AlertDialogTitle>
|
|
</AlertDialogHeader>
|
|
<AlertDialogFooter>
|
|
<AlertDialogCancel variant="outline">Discard</AlertDialogCancel>
|
|
<AlertDialogAction variant="primary">Save</AlertDialogAction>
|
|
</AlertDialogFooter>
|
|
</AlertDialogContent>
|
|
</AlertDialogOverlay>
|
|
</Portal>
|
|
</AlertDialog>
|
|
<Text>No choice yet</Text>
|
|
</div>
|
|
);
|
|
}
|