Skip to content

Commit

Permalink
Merge pull request #1384 from edenia/chore/change-producers-chart-sty…
Browse files Browse the repository at this point in the history
…les-1382

chore(webapp): set text color for producer names except the one producing
  • Loading branch information
xavier506 authored Nov 8, 2023
2 parents 7e8be98 + c976036 commit 841fe5e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions webapp/src/components/ChartHeader/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export default (theme) => ({
justifyContent: 'space-between',
flexDirection: 'column',
alignItems: 'baseline',
minHeight: '60px',
padding: theme.spacing(1),
[theme.breakpoints.up('md')]: {
justifyContent: 'space-between',
Expand Down
7 changes: 5 additions & 2 deletions webapp/src/components/ProducersChart/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,17 @@ const CustomBarLabel = memo(
}

const ProducerName = () => {
const isProducing = fill === theme.palette.primary.main

const Content = () => (
<text
transform={`translate(${cartesianText.x}, ${cartesianText.y})`}
textAnchor={getNameTextAnchor(x, cx)}
dominantBaseline="central"
fill={theme.palette.primary.main}
fill={isProducing ? fill : theme.palette.text.primary}
fontSize={sm ? 14 : 12}
fontFamily="Roboto, Helvetica, Arial, sans-serif;"
fontWeight={fill === theme.palette.primary.main ? 'bold' : 'normal'}
fontWeight={isProducing ? 'bold' : 'normal'}
>
{payload.owner}
</text>
Expand Down Expand Up @@ -258,6 +260,7 @@ const ProducersChart = ({ producers, info }) => {
? theme.palette.primary.main
: theme.palette.primary.light
}
stroke={theme.palette.background.default}
/>
)
})}
Expand Down

0 comments on commit 841fe5e

Please sign in to comment.