on f6af024 help sign in
bridge/src/components/LoadingBar.jsx
19 lines 449 B history raw
1import React from 'react';
2import cn from 'classnames';
4// progrss is [0, 1]
5export default function LoadingBar({ className, progress = 1.0 }) {
6 return (
7 <div className={cn('rel bg-gray2', className)} style={{ height: '4px' }}>
8 <div
9 className="abs bg-green3 animated-width"
10 style={{
11 top: 0,
12 bottom: 0,
13 left: 0,
14 width: `${progress * 100.0}%`,
15 }}
16 />
17 </div>
18 );