Download tabler-react/src/components/StampCard/StampCard.react.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 917 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/tabler-react/src/components/StampCard/StampCard.react.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/tabler-react/src/components/StampCard/StampCard.react.js
-
curl -L -o StampCard.react.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/tabler-react/src/components/StampCard/StampCard.react.js
917 Bytes
| // @flow | |
| import * as React from "react"; | |
| import cn from "classnames"; | |
| import { Card, Stamp, Header, Text } from "../"; | |
| type Props = {| | |
| +children?: React.Node, | |
| +className?: string, | |
| +icon?: string, | |
| +color?: string, | |
| +header?: React.Node, | |
| +footer?: React.Node, | |
| |}; | |
| function StampCard({ | |
| children, | |
| className, | |
| icon, | |
| color = "", | |
| header, | |
| footer, | |
| }: Props): React.Node { | |
| const classes = cn("p-3", className); | |
| return ( | |
| <Card className={classes}> | |
| <div className="d-flex align-items-center"> | |
| <Stamp color={color} icon={icon} className="mr-3" /> | |
| <div> | |
| {header && ( | |
| <Header size={4} className="m-0"> | |
| {header} | |
| </Header> | |
| )} | |
| {children} | |
| {footer && <Text.Small muted>{footer}</Text.Small>} | |
| </div> | |
| </div> | |
| </Card> | |
| ); | |
| } | |
| StampCard.displayName = "StampCard"; | |
| export default StampCard; | |