mirror of
https://github.com/Unleash/unleash.git
synced 2025-07-31 13:47:02 +02:00
chore: use palette.background.alternative for background (#8627)
The default badge styling uses theme.palette.primary.main for the color, but this color doesn't give us the contrast we need in dark mode. The solution is to use theme.palette.background.alternative instead. Before:  After: 
This commit is contained in:
parent
ea08067534
commit
88e1ec5dc4
@ -23,6 +23,12 @@ interface IEventTimelineEventProps {
|
|||||||
endTime: number;
|
endTime: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const StyledBadge = styled(Badge)(({ theme }) => ({
|
||||||
|
'.MuiBadge-badge': {
|
||||||
|
backgroundColor: theme.palette.background.alternative,
|
||||||
|
},
|
||||||
|
}));
|
||||||
|
|
||||||
export const EventTimelineEventGroup = ({
|
export const EventTimelineEventGroup = ({
|
||||||
group,
|
group,
|
||||||
startTime,
|
startTime,
|
||||||
@ -48,13 +54,12 @@ export const EventTimelineEventGroup = ({
|
|||||||
maxWidth={350}
|
maxWidth={350}
|
||||||
arrow
|
arrow
|
||||||
>
|
>
|
||||||
<Badge
|
<StyledBadge
|
||||||
badgeContent={group.length}
|
badgeContent={group.length}
|
||||||
color='primary'
|
|
||||||
invisible={group.length < 2}
|
invisible={group.length < 2}
|
||||||
>
|
>
|
||||||
<EventTimelineEventCircle group={group} />
|
<EventTimelineEventCircle group={group} />
|
||||||
</Badge>
|
</StyledBadge>
|
||||||
</HtmlTooltip>
|
</HtmlTooltip>
|
||||||
</StyledEvent>
|
</StyledEvent>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user