-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #141 from qwikerx/feat/bind-ref-to-dropdown-button
feat: bind ref to dropdown trigger
- Loading branch information
Showing
9 changed files
with
325 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -869,8 +869,7 @@ export const examples: Record<string, Example[]> = { | |
}, | ||
{ | ||
title: 'User avatar', | ||
description: | ||
'You can use the `as` prop to set the trigger element to an image. The trigger passed as props should not be a button element as Dropdown use button element internally. This example can be used to show a list of menu items and options when a user is logged into your application.', | ||
description: 'You can use the `as` prop to set the trigger element to an image.', | ||
url: '/examples/[theme-rtl]/dropdown/06-dropdown-user-avatar', | ||
content: | ||
'import { component$ } from \'@builder.io/qwik\'\nimport { Dropdown } from \'flowbite-qwik\'\n\nexport default component$(() => {\n return (\n <div class="flex gap-5">\n <Dropdown\n as={\n <img\n class="w-8 h-8 rounded-full"\n src="https://res.cloudinary.com/dkht4mwqi/image/upload/f_auto,q_auto/v1718462568/flowbite-qwik/jpnykkz8ojq7ojgg4qta.jpg"\n alt="user photo"\n />\n }\n >\n <Dropdown.Item header>\n <span class="block text-sm">Bonnie Green</span>\n <span class="block truncate text-sm font-medium">[email protected]</span>\n </Dropdown.Item>\n <Dropdown.Item>Dashboard</Dropdown.Item>\n <Dropdown.Item>Settings</Dropdown.Item>\n <Dropdown.Item divider />\n <Dropdown.Item>Sign out</Dropdown.Item>\n </Dropdown>\n\n <Dropdown\n as={\n <img\n class="w-8 h-8 rounded-full"\n src="https://res.cloudinary.com/dkht4mwqi/image/upload/f_auto,q_auto/v1718462568/flowbite-qwik/jpnykkz8ojq7ojgg4qta.jpg"\n alt="user photo"\n />\n }\n >\n <Dropdown.Item header>\n <span class="block text-sm">Bonnie Green</span>\n <span class="block truncate text-sm font-medium">[email protected]</span>\n </Dropdown.Item>\n <Dropdown.Item>Dashboard</Dropdown.Item>\n <Dropdown.Item>Settings</Dropdown.Item>\n <Dropdown.Item divider />\n <Dropdown.Item>Sign out</Dropdown.Item>\n </Dropdown>\n\n <Dropdown\n as={\n <img\n class="w-8 h-8 rounded-full"\n src="https://res.cloudinary.com/dkht4mwqi/image/upload/f_auto,q_auto/v1718462568/flowbite-qwik/jpnykkz8ojq7ojgg4qta.jpg"\n alt="user photo"\n />\n }\n >\n <Dropdown.Item header>\n <span class="block text-sm">Bonnie Green</span>\n <span class="block truncate text-sm font-medium">[email protected]</span>\n </Dropdown.Item>\n <Dropdown.Item>Dashboard</Dropdown.Item>\n <Dropdown.Item>Settings</Dropdown.Item>\n <Dropdown.Item divider />\n <Dropdown.Item>Sign out</Dropdown.Item>\n </Dropdown>\n </div>\n )\n})', | ||
|
2 changes: 1 addition & 1 deletion
2
apps/web/src/routes/examples/[theme-rtl]/dropdown/06-dropdown-user-avatar/[email protected]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
284 changes: 284 additions & 0 deletions
284
apps/web/vite.config.ts.timestamp-1719213116855-dfc935387f531.mjs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters