Download tabler-react/src/components/List/List.react.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 773 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/tabler-react/src/components/List/List.react.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/tabler-react/src/components/List/List.react.js
-
curl -L -o List.react.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/tabler-react/src/components/List/List.react.js
773 Bytes
| // @flow | |
| import * as React from "react"; | |
| import cn from "classnames"; | |
| import ListItem from "./ListItem.react"; | |
| import ListGroup from "./ListGroup.react"; | |
| import ListGroupItem from "./ListGroupItem.react"; | |
| type Props = {| | |
| +children?: React.Node, | |
| +className?: string, | |
| +unstyled?: boolean, | |
| +seperated?: boolean, | |
| +inline?: boolean, | |
| |}; | |
| function List({ | |
| className, | |
| children, | |
| unstyled, | |
| seperated, | |
| inline, | |
| }: Props): React.Node { | |
| const classes = cn( | |
| { | |
| list: !unstyled, | |
| "list-unstyled": unstyled, | |
| "list-seperated": seperated, | |
| "list-inline": inline, | |
| }, | |
| className | |
| ); | |
| return <ul className={classes}>{children}</ul>; | |
| } | |
| List.Item = ListItem; | |
| List.Group = ListGroup; | |
| List.GroupItem = ListGroupItem; | |
| export default List; | |