mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
Fix: insights beta badge (#6568)
Reuses the beta badge from insights <img width="1448" alt="Screenshot 2024-03-14 at 18 01 42" src="https://github.com/Unleash/unleash/assets/104830839/c85b6838-c120-471b-9ff3-440c4208dc53"> --------- Signed-off-by: andreas-unleash <andreas@getunleash.ai>
This commit is contained in:
parent
dfdd9f0dd3
commit
26ad9fc3f4
@ -127,34 +127,19 @@ const StyledAdvancedNavButton = styled('button')(({ theme }) => ({
|
||||
cursor: 'pointer',
|
||||
}));
|
||||
|
||||
const StyledSpan = styled('span')({
|
||||
height: '16px',
|
||||
paddingBottom: 16,
|
||||
});
|
||||
|
||||
const StyledBadge = styled(Badge)({
|
||||
height: '16px',
|
||||
maxHeight: '16px',
|
||||
padding: 0.25,
|
||||
marginBottom: 0,
|
||||
});
|
||||
|
||||
const styledIconProps = (theme: Theme) => ({
|
||||
color: theme.palette.neutral.main,
|
||||
});
|
||||
|
||||
const StyledLink = styled(Link)(({ theme }) => focusable(theme));
|
||||
|
||||
const StyledLinkWithBetaBagde = ({
|
||||
const StyledLinkWithBetaBadge = ({
|
||||
title,
|
||||
to,
|
||||
}: { title: string; to: string }) => (
|
||||
<StyledLink to={to} sx={{ margin: 0 }}>
|
||||
<div>
|
||||
<span>{title}</span>{' '}
|
||||
<StyledSpan>
|
||||
<StyledBadge color='success'>Beta</StyledBadge>
|
||||
</StyledSpan>
|
||||
<span>{title}</span> <Badge color='success'>Beta</Badge>
|
||||
</div>
|
||||
</StyledLink>
|
||||
);
|
||||
@ -279,7 +264,7 @@ const Header: VFC = () => {
|
||||
<ConditionallyRender
|
||||
condition={insightsDashboard}
|
||||
show={
|
||||
<StyledLinkWithBetaBagde
|
||||
<StyledLinkWithBetaBadge
|
||||
to={'/insights'}
|
||||
title={'Insights'}
|
||||
/>
|
||||
|
Loading…
Reference in New Issue
Block a user