@@ -182,7 +182,7 @@ Use this example if you want to add form elements inside the drawer component in
182182
183183``` svelte example
184184<script>
185- import { Drawer, CardPlaceholder, Button, Label, Input, Textarea } from "flowbite-svelte";
185+ import { Avatar, Drawer, CardPlaceholder, Button, Label, Input, Textarea } from "flowbite-svelte";
186186 import { InfoCircleSolid, UserAddOutline, CalendarEditSolid } from "flowbite-svelte-icons";
187187
188188 let open4 = $state(false);
@@ -192,40 +192,35 @@ Use this example if you want to add form elements inside the drawer component in
192192 <Button onclick={() => (open4 = true)}>Show drawer form</Button>
193193 <CardPlaceholder size="2xl" class="mt-6" />
194194</div>
195- <Drawer bind:open={open4}>
195+ <Drawer form bind:open={open4} classes={{ form: "space-y-6 mb-6" } }>
196196 <h5 class="mb-6 inline-flex items-center text-base font-semibold text-gray-500 uppercase dark:text-gray-400">
197197 <InfoCircleSolid class="me-2.5 h-5 w-5" />New event
198198 </h5>
199- <form method="dialog" class="mb-6">
200- <div class="mb-6">
201- <Label for="title" class="mb-2 block">Title</Label>
202- <Input id="title" name="title" required placeholder="Apple Keynote" />
203- </div>
204- <div class="mb-6">
205- <Label for="description" class="mb-2">Description</Label>
206- <Textarea id="message" placeholder="Write event description..." rows={4} name="message" class="w-full" />
207- </div>
208- <div class="mb-6">
209- <Input id="date" name="date" required type="date" />
210- </div>
211- <div class="mb-4">
212- <div class="relative">
213- <Input id="search" placeholder="Add guest email" class="p-3" />
214- <Button class="bg-primary-700 hover:bg-primary-800 focus:ring-primary-300 dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800 absolute end-2 bottom-2 inline-flex items-center rounded-lg px-3 py-1 text-sm font-medium text-white focus:ring-4 focus:outline-hidden" type="submit">
215- <UserAddOutline class="me-1.5 h-3 w-3 text-white" />Add
216- </Button>
217- </div>
218- </div>
219- <div class="mb-4 flex -space-x-4 rtl:space-x-reverse">
220- <img class="h-8 w-8 rounded-full border-2 border-white dark:border-gray-800" src="/images/profile-picture-1.webp" alt="" />
221- <img class="h-8 w-8 rounded-full border-2 border-white dark:border-gray-800" src="/images/profile-picture-2.webp" alt="" />
222- <img class="h-8 w-8 rounded-full border-2 border-white dark:border-gray-800" src="/images/profile-picture-3.webp" alt="" />
223- <img class="h-8 w-8 rounded-full border-2 border-white dark:border-gray-800" src="/images/profile-picture-4.webp" alt="" />
224- </div>
225- <Button type="submit" class="w-full">
226- <CalendarEditSolid class="me-2.5 h-3.5 w-3.5 text-white" /> Create event
227- </Button>
228- </form>
199+ <Label>
200+ Title
201+ <Input name="title" class="mt-2" required placeholder="Apple Keynote" />
202+ </Label>
203+ <Label>
204+ Description
205+ <Textarea placeholder="Write event description..." rows={4} name="message" class="mt-2 w-full font-normal" />
206+ </Label>
207+ <Input name="date" required type="date" />
208+ <Input placeholder="Add guest email">
209+ {#snippet right()}
210+ <Button size="xs">
211+ <UserAddOutline class="me-1.5 h-4 w-4 text-white" />Add
212+ </Button>
213+ {/snippet}
214+ </Input>
215+ <div class="mb-4 flex">
216+ <Avatar src="/images/profile-picture-1.webp" stacked size="sm" />
217+ <Avatar src="/images/profile-picture-2.webp" stacked size="sm" />
218+ <Avatar src="/images/profile-picture-3.webp" stacked size="sm" />
219+ <Avatar src="/images/profile-picture-4.webp" stacked size="sm" />
220+ </div>
221+ <Button type="submit" class="w-full">
222+ <CalendarEditSolid class="me-2.5 h-3.5 w-3.5 text-white" /> Create event
223+ </Button>
229224</Drawer>
230225```
231226
0 commit comments