Skip to content

Commit

Permalink
feat: use opacity instead of dot
Browse files Browse the repository at this point in the history
Signed-off-by: Pianist038801 <[email protected]>
  • Loading branch information
Pianist038801 committed Oct 26, 2021
1 parent be5ee74 commit e08c96d
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions src/components/common/BarChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,6 @@ const useStyles = makeStyles((theme: Theme) => ({
cursor: 'pointer',
width: '80%',
marginLeft: '10%'
},
circle: {
borderRadius: '50%',
backgroundColor: 'purple',
height: 6,
marginTop: 3,
width: 6
}
}));

Expand Down Expand Up @@ -90,14 +83,12 @@ const BarChartItem: React.FC<BarChartItemProps> = ({
<>
<div
className={styles.itemBar}
style={{ backgroundColor: color, height: `${value}%` }}
onClick={onClick}
/>
<div
className={styles.circle}
style={{
backgroundColor: isSelected ? '#CC23E8' : 'transparent'
backgroundColor: color,
height: `${value}%`,
opacity: isSelected ? '100%' : '50%'
}}
onClick={onClick}
/>
</>
);
Expand Down

0 comments on commit e08c96d

Please sign in to comment.