Files
omnivore/packages/web/components/elements/ProgressBar.tsx
2023-08-03 13:21:46 +08:00

30 lines
593 B
TypeScript

import { Box } from './../elements/LayoutPrimitives'
type ProgressBarProps = {
fillPercentage: number
fillColor: string
backgroundColor: string
borderRadius: string
}
export function ProgressBar(props: ProgressBarProps): JSX.Element {
return (
<Box
css={{
height: '5px',
width: '100%',
overflow: 'hidden',
backgroundColor: props.backgroundColor,
}}
>
<Box
css={{
height: '100%',
width: `${props.fillPercentage}%`,
backgroundColor: props.fillColor,
}}
/>
</Box>
)
}