Download tabler-react/src/components/Nav/NavSubItem.react.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 631 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/tabler-react/src/components/Nav/NavSubItem.react.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/tabler-react/src/components/Nav/NavSubItem.react.js
-
curl -L -o NavSubItem.react.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/tabler-react/src/components/Nav/NavSubItem.react.js
631 Bytes
| // @flow | |
| import * as React from "react"; | |
| import Dropdown from "../Dropdown"; | |
| type Props = {| | |
| +children?: React.Node, | |
| +className?: string, | |
| +LinkComponent?: React.ElementType, | |
| +to?: string, | |
| +icon?: string, | |
| +value?: string, | |
| +useExact?: boolean, | |
| |}; | |
| function NavSubItem({ | |
| children, | |
| LinkComponent, | |
| className, | |
| to, | |
| icon, | |
| hasSubNav, | |
| value, | |
| useExact, | |
| }: Props): React.Node { | |
| return ( | |
| <Dropdown.Item to={to} icon={icon} RootComponent={LinkComponent} useExact={useExact || false}> | |
| {value || children} | |
| </Dropdown.Item> | |
| ); | |
| } | |
| NavSubItem.displayName = "Nav.SubItem"; | |
| export default NavSubItem; | |