Skip to content

Commit

Permalink
replace with styled component
Browse files Browse the repository at this point in the history
Signed-off-by: andreas-unleash <[email protected]>
  • Loading branch information
andreas-unleash committed Apr 12, 2024
1 parent d98f35b commit 5812923
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions frontend/src/component/menu/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
styled,
type Theme,
Box,
Typography,
} from '@mui/material';
import MenuIcon from '@mui/icons-material/Menu';
import SettingsIcon from '@mui/icons-material/Settings';
Expand Down Expand Up @@ -118,21 +117,20 @@ const styledIconProps = (theme: Theme) => ({

const StyledLink = styled(Link)(({ theme }) => focusable(theme));

const StyledText = styled('div')(({ theme }) => ({
display: 'flex',
alignItems: 'center',
gap: theme.spacing(1),
}));

const StyledLinkWithBetaBadge = ({
title,
to,
}: { title: string; to: string }) => (
<StyledLink to={to} sx={{ margin: 0 }}>
<Typography
component='div'
sx={(theme) => ({
display: 'flex',
alignItems: 'center',
gap: theme.spacing(1),
})}
>
<StyledText>
<span>{title}</span> <Badge color='success'>Beta</Badge>
</Typography>
</StyledText>
</StyledLink>
);

Expand Down

0 comments on commit 5812923

Please sign in to comment.