1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-10-27 11:02:16 +01:00

Chore: some cleanup

This commit is contained in:
Thomas Heartman 2024-10-31 09:42:06 +01:00
parent 402171c307
commit 98af0df385
No known key found for this signature in database
GPG Key ID: BD1F880DAED1EE78

View File

@ -66,38 +66,39 @@ interface ITab {
isEnterprise?: boolean; isEnterprise?: boolean;
} }
const NotificationIndicator = styled('div')(({ theme }) => ({ const CircleContainer = styled('div')(({ theme }) => ({
position: 'absolute', position: 'absolute',
background: theme.palette.background.alternative,
color: theme.palette.primary.contrastText,
fontSize: theme.typography.body2.fontSize,
top: 10,
right: 0,
[theme.breakpoints.down('md')]: {
top: 2,
},
width: theme.spacing(2.5), width: theme.spacing(2.5),
height: theme.spacing(2.5), height: theme.spacing(2.5),
display: 'grid', display: 'grid',
placeItems: 'center', placeItems: 'center',
borderRadius: '50%', borderRadius: '50%',
background: theme.palette.background.alternative,
color: theme.palette.primary.contrastText,
fontSize: theme.typography.body2.fontSize,
// todo: revisit these values later
top: 10,
[theme.breakpoints.down('md')]: {
top: 2,
},
})); }));
const ActionableChangeRequestsIndicator = () => { const ActionableChangeRequestsIndicator = () => {
// useSWR for this instead (maybe conditional) // todo: useSWR for this instead (maybe conditional)
const count = 5; const count = 5;
const renderedCount = count > 9 ? '9+' : count; const renderedCount = count > 9 ? '9+' : count;
return ( return (
<NotificationIndicator> <CircleContainer>
<ScreenReaderOnly>You can move</ScreenReaderOnly> <ScreenReaderOnly>You can move</ScreenReaderOnly>
{renderedCount} {renderedCount}
<ScreenReaderOnly> <ScreenReaderOnly>
change requests into their next phase. change requests into their next phase.
</ScreenReaderOnly> </ScreenReaderOnly>
</NotificationIndicator> </CircleContainer>
); );
}; };