1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-24 17:51:14 +02:00
unleash.unleash/frontend/src/component/admin/menu/CenteredNavLink.tsx
Tymoteusz Czech 208ca05933
Update menu for billing page (#4525)
## About the changes

- [x] Show admin menu on billing page in cloud offering. Category menu
was not showing up because we have 2 different pages for billing (hosted
or not)
  - [x] Fix menu tab padding
 
https://linear.app/unleash/issue/1-1266/update-menu-for-billing-page
2023-08-18 10:40:35 +02:00

22 lines
568 B
TypeScript

import { styled } from '@mui/material';
import { FC } from 'react';
import { NavLink } from 'react-router-dom';
const StyledNavLink = styled(NavLink)(({ theme }) => ({
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
width: '100%',
height: '100%',
textDecoration: 'none',
color: 'inherit',
padding: theme.spacing(0, 5),
'&.active': {
fontWeight: 'bold',
},
}));
export const CenteredNavLink: FC<{ to: string }> = ({ to, children }) => {
return <StyledNavLink to={to}>{children}</StyledNavLink>;
};