2022-05-02 09:57:14 -07:00
|
|
|
import React from 'react';
|
|
|
|
|
|
|
|
interface IProgressBar {
|
|
|
|
progress: number,
|
|
|
|
}
|
|
|
|
|
2022-05-11 19:08:04 -07:00
|
|
|
/** A horizontal meter filled to the given percentage. */
|
2022-05-02 09:57:14 -07:00
|
|
|
const ProgressBar: React.FC<IProgressBar> = ({ progress }) => (
|
2022-07-22 10:30:16 -07:00
|
|
|
<div className='h-2.5 w-full rounded-full bg-gray-300 dark:bg-primary-800 overflow-hidden'>
|
|
|
|
<div className='h-full bg-secondary-500' style={{ width: `${Math.floor(progress * 100)}%` }} />
|
2022-05-02 09:57:14 -07:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
|
|
|
|
export default ProgressBar;
|