mirror of
https://github.com/lc-soft/LCUI.git
synced 2026-11-30 16:48:21 +01:00
43 lines
1.0 KiB
TypeScript
43 lines
1.0 KiB
TypeScript
import {
|
|
Dialog,
|
|
DialogTrigger,
|
|
DialogOverlay,
|
|
DialogContent,
|
|
DialogHeader,
|
|
DialogTitle,
|
|
DialogDescription,
|
|
DialogFooter,
|
|
DialogClose,
|
|
TextInput,
|
|
Portal,
|
|
} from "@lcui/react";
|
|
|
|
export default function Example() {
|
|
return (
|
|
<Dialog>
|
|
<DialogTrigger>Share</DialogTrigger>
|
|
<Portal>
|
|
<DialogOverlay>
|
|
<DialogContent className="max-w-md">
|
|
<DialogHeader>
|
|
<DialogTitle>Share link</DialogTitle>
|
|
<DialogDescription>
|
|
Anyone who has this link will be able to view this.
|
|
</DialogDescription>
|
|
</DialogHeader>
|
|
<TextInput
|
|
defaultValue="https://lcui.dev/docs/installation"
|
|
readOnly
|
|
className="flex-1"
|
|
/>
|
|
<DialogFooter className="justify-start">
|
|
<DialogClose>Close</DialogClose>
|
|
</DialogFooter>
|
|
<DialogClose />
|
|
</DialogContent>
|
|
</DialogOverlay>
|
|
</Portal>
|
|
</Dialog>
|
|
);
|
|
}
|