Download tabler-react/src/components/Progress/ProgressBar.react.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 456 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/tabler-react/src/components/Progress/ProgressBar.react.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/tabler-react/src/components/Progress/ProgressBar.react.js
-
curl -L -o ProgressBar.react.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/tabler-react/src/components/Progress/ProgressBar.react.js
456 Bytes
| // @flow | |
| import * as React from "react"; | |
| import cn from "classnames"; | |
| type Props = {| | |
| +className?: string, | |
| +color?: string, | |
| +width?: number, | |
| |}; | |
| function ProgressBar({ className, color = "", width = 0 }: Props): React.Node { | |
| const classes = cn(`progress-bar`, { [`bg-${color}`]: !!color }, className); | |
| return <div className={classes} style={{ width: `${width}%` }} />; | |
| } | |
| ProgressBar.displayName = "Progress.Bar"; | |
| export default ProgressBar; | |