|
Download tabler-react/src/components/Dropdown/Dropdown.examples.md from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 872 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/tabler-react/src/components/Dropdown/Dropdown.examples.md
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/tabler-react/src/components/Dropdown/Dropdown.examples.md
-
curl -L -o Dropdown.examples.md https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/tabler-react/src/components/Dropdown/Dropdown.examples.md
872 Bytes
| ### Basic Dropdown | |
| ```jsx | |
| <Dropdown> | |
| <Dropdown.Trigger>Menu</Dropdown.Trigger> | |
| <Dropdown.Menu> | |
| <Dropdown.Item>Profile</Dropdown.Item> | |
| <Dropdown.ItemDivider /> | |
| <Dropdown.Item>Logout</Dropdown.Item> | |
| </Dropdown.Menu> | |
| </Dropdown> | |
| ``` | |
| ### Dropdown Variations | |
| ```jsx | |
| <Dropdown | |
| type="button" | |
| toggle={false} | |
| color="primary" | |
| arrow | |
| icon="globe" | |
| triggerContent="Button" | |
| itemsObject={[ | |
| { | |
| value: "Profile", | |
| }, | |
| { isDivider: true }, | |
| { value: "Logout" }, | |
| ]} | |
| /> | |
| ``` | |
| ### Dropdown Items | |
| ```jsx | |
| <Dropdown | |
| type="button" | |
| color="primary" | |
| arrow | |
| icon="globe" | |
| triggerContent="Item Icons and Badges" | |
| itemsObject={[ | |
| { | |
| value: "Profile", | |
| icon: "user", | |
| }, | |
| { | |
| value: "Notifications", | |
| badge: "New!", | |
| badgeType: "success", | |
| }, | |
| { isDivider: true }, | |
| { value: "Logout" }, | |
| ]} | |
| /> | |
| ``` | |