Files

56 lines
1.4 KiB
TypeScript

import {
Dialog,
DialogTrigger,
DialogOverlay,
DialogContent,
DialogHeader,
DialogTitle,
DialogDescription,
DialogFooter,
DialogClose,
Field,
FieldGroup,
Label,
TextInput,
Portal,
} from "@lcui/react";
export default function Example() {
return (
<Dialog>
<DialogTrigger>Open Dialog</DialogTrigger>
<Portal>
<DialogOverlay>
<DialogContent>
<DialogHeader>
<DialogTitle>Edit profile</DialogTitle>
<DialogDescription>
Make changes to your profile here. Click save when you're done.
</DialogDescription>
</DialogHeader>
<FieldGroup>
<Field>
<Label htmlFor="name-1">Name</Label>
<TextInput id="name-1" name="name" defaultValue="Pedro Duarte" />
</Field>
<Field>
<Label htmlFor="username-1">Username</Label>
<TextInput
id="username-1"
name="username"
defaultValue="@peduarte"
/>
</Field>
</FieldGroup>
<DialogFooter>
<DialogClose variant="outline">Cancel</DialogClose>
<button variant="primary">Save changes</button>
</DialogFooter>
<DialogClose />
</DialogContent>
</DialogOverlay>
</Portal>
</Dialog>
);
}