Download tabler-react/src/components/CommentsCard/CommentsCard.react.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 728 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/tabler-react/src/components/CommentsCard/CommentsCard.react.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/tabler-react/src/components/CommentsCard/CommentsCard.react.js
-
curl -L -o CommentsCard.react.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/tabler-react/src/components/CommentsCard/CommentsCard.react.js
728 Bytes
| // @flow | |
| import * as React from "react"; | |
| import cn from "classnames"; | |
| import FormWithSingleInputAndButton from "../../forms/FormWithSingleInputAndButton.react"; | |
| import Card from "../Card"; | |
| import Comment from "../Comment"; | |
| type Props = {| | |
| +children?: React.Node, | |
| +className?: string, | |
| |}; | |
| function CommentsCard({ className, children }: Props): React.Node { | |
| const classes = cn(className); | |
| return ( | |
| <Card className={classes}> | |
| <Card.Header> | |
| <FormWithSingleInputAndButton | |
| inputProps={{ placeholder: "Message" }} | |
| buttonProps={{ icon: "camera", color: "secondary" }} | |
| /> | |
| <Comment>{children}</Comment> | |
| </Card.Header> | |
| </Card> | |
| ); | |
| } | |
| export default CommentsCard; | |