bigbuffet-rw/app/soapbox/components/ui/progress-bar/progress-bar.tsx
2022-05-11 21:08:04 -05:00

14 lines
431 B
TypeScript

import React from 'react';
interface IProgressBar {
progress: number,
}
/** A horizontal meter filled to the given percentage. */
const ProgressBar: React.FC<IProgressBar> = ({ progress }) => (
<div className='h-2.5 w-full rounded-full bg-gray-100 dark:bg-slate-900/50 overflow-hidden'>
<div className='h-full bg-accent-500' style={{ width: `${Math.floor(progress * 100)}%` }} />
</div>
);
export default ProgressBar;