Skip to content

Commit

Permalink
Fix padding for tabs in admin section (#2772)
Browse files Browse the repository at this point in the history
Tabs from admin section were missing paddings left-right.
This PR adds these paddings.
  • Loading branch information
sjaanus committed Jan 2, 2023
1 parent 9e40cfd commit c62d775
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions frontend/src/component/admin/menu/AdminMenu.tsx
@@ -1,9 +1,16 @@
import { useLocation } from 'react-router-dom';
import { Paper, Tab, Tabs } from '@mui/material';
import { Paper, styled, Tab, Tabs } from '@mui/material';
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
import { useInstanceStatus } from 'hooks/api/getters/useInstanceStatus/useInstanceStatus';
import { CenteredNavLink } from './CenteredNavLink';

const StyledPaper = styled(Paper)(({ theme }) => ({
marginBottom: '1rem',
borderRadius: '12.5px',
boxShadow: 'none',
padding: '0 2rem',
}));

function AdminMenu() {
const { uiConfig } = useUiConfig();
const { pathname } = useLocation();
Expand All @@ -13,13 +20,7 @@ function AdminMenu() {
const activeTab = pathname.split('/')[2];

return (
<Paper
style={{
marginBottom: '1rem',
borderRadius: '12.5px',
boxShadow: 'none',
}}
>
<StyledPaper>
<Tabs
value={activeTab}
variant="scrollable"
Expand Down Expand Up @@ -120,7 +121,7 @@ function AdminMenu() {
/>
)}
</Tabs>
</Paper>
</StyledPaper>
);
}

Expand Down

1 comment on commit c62d775

@vercel
Copy link

@vercel vercel bot commented on c62d775 Jan 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.