|
Download tabler-react/src/components/Dropdown/DropdownMenu.examples.md from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 608 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/tabler-react/src/components/Dropdown/DropdownMenu.examples.md
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/tabler-react/src/components/Dropdown/DropdownMenu.examples.md
-
curl -L -o DropdownMenu.examples.md https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/tabler-react/src/components/Dropdown/DropdownMenu.examples.md
608 Bytes
<Dropdown>
<Dropdown.Trigger>Menu</Dropdown.Trigger>
<Dropdown.Menu>
<Dropdown.Item>Profile</Dropdown.Item>
<Dropdown.ItemDivider />
<Dropdown.Item>Logout</Dropdown.Item>
</Dropdown.Menu>
</Dropdown>
Adding a Menu and Items through props
Using the 'items' prop containing Dropdown.Items
<Dropdown
triggerContent="Menu"
items={<Dropdown.Item>An Item</Dropdown.Item>}
/>
Or the 'itemsObject' array:
<Dropdown
triggerContent="Menu"
itemsObject={[
{
value: "Profile",
},
{ isDivider: true },
{ value: "Logout" },
]}
/>