You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
720 B
27 lines
720 B
import React from 'react';
|
|
|
|
import styles from './index.less';
|
|
|
|
const MiniProgress = ({ target, color, strokeWidth, percent }) => (
|
|
<div className={styles.miniProgress}>
|
|
<div
|
|
className={styles.target}
|
|
style={{ left: (target ? `${target}%` : null) }}
|
|
>
|
|
<span style={{ backgroundColor: (color || null) }} />
|
|
<span style={{ backgroundColor: (color || null) }} />
|
|
</div>
|
|
<div className={styles.progressWrap}>
|
|
<div
|
|
className={styles.progress}
|
|
style={{
|
|
backgroundColor: (color || null),
|
|
width: (percent ? `${percent}%` : null),
|
|
height: (strokeWidth || null),
|
|
}}
|
|
/>
|
|
</div>
|
|
</div>
|
|
);
|
|
|
|
export default MiniProgress;
|
|
|