File size: 456 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// @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;