File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ Fix headers colors after changing Explorer background
Original file line number Diff line number Diff line change @@ -2,40 +2,33 @@ import { FC } from 'react'
22import Box from '@mui/material/Box'
33import Typography from '@mui/material/Typography'
44import { COLORS } from 'styles/theme/colors'
5- import { useScreenSize } from '../../hooks/useScreensize '
5+ import { useTheme } from '@mui/material/styles '
66
77type CardHeaderWithCounterProps = {
88 label : string | undefined
99 totalCount : number | undefined
1010 isTotalCountClipped : boolean | undefined
11- changeMobileColors ?: boolean
1211}
1312
1413export const CardHeaderWithCounter : FC < CardHeaderWithCounterProps > = ( {
1514 label,
1615 totalCount,
1716 isTotalCountClipped,
18- changeMobileColors,
1917} ) => {
20- const { isMobile } = useScreenSize ( )
18+ const theme = useTheme ( )
2119
2220 return (
2321 < Box sx = { { display : 'flex' , alignItems : 'baseline' } } gap = { '0.8ex' } >
2422 < Typography
2523 fontWeight = { 700 }
2624 component = "span"
27- color = { isMobile && changeMobileColors ? COLORS . white : COLORS . brandExtraDark }
25+ color = { theme . palette . layout . titleOnBackground }
2826 fontSize = "inherit"
2927 >
3028 { label }
3129 </ Typography >
3230 { ! ! totalCount && (
33- < Typography
34- fontWeight = "normal"
35- component = "span"
36- color = { isMobile && changeMobileColors ? COLORS . white : COLORS . grayMedium }
37- fontSize = "inherit"
38- >
31+ < Typography fontWeight = "normal" component = "span" color = { COLORS . grayMedium } fontSize = "inherit" >
3932 ({ `${ isTotalCountClipped ? '>' : '' } ${ totalCount } ` } )
4033 </ Typography >
4134 ) }
Original file line number Diff line number Diff line change @@ -51,7 +51,6 @@ export const ConsensusAccountsPage: FC = () => {
5151 < SubPageCard
5252 title = {
5353 < CardHeaderWithCounter
54- changeMobileColors
5554 label = { t ( 'account.listTitle' ) }
5655 totalCount = { accountsData ?. total_count }
5756 isTotalCountClipped = { accountsData ?. is_total_count_clipped }
Original file line number Diff line number Diff line change @@ -51,7 +51,6 @@ export const ProposalsPage: FC = () => {
5151 < SubPageCard
5252 title = {
5353 < CardHeaderWithCounter
54- changeMobileColors
5554 label = { t ( 'networkProposal.listTitle' ) }
5655 totalCount = { proposalsData ?. total_count }
5756 isTotalCountClipped = { proposalsData ?. is_total_count_clipped }
Original file line number Diff line number Diff line change @@ -52,7 +52,6 @@ export const ValidatorsPage: FC = () => {
5252 < SubPageCard
5353 title = {
5454 < CardHeaderWithCounter
55- changeMobileColors
5655 label = { t ( 'validator.listTitle' ) }
5756 totalCount = { validatorsData ?. total_count }
5857 isTotalCountClipped = { validatorsData ?. is_total_count_clipped }
You can’t perform that action at this time.
0 commit comments