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

Fix padding for tabs in admin section ()

Tabs from admin section were missing paddings left-right.
This PR adds these paddings.
This commit is contained in:
sjaanus 2023-01-02 15:40:37 +02:00 committed by GitHub
parent 9e40cfd4c7
commit c62d775933
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,9 +1,16 @@
import { useLocation } from 'react-router-dom'; 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 useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
import { useInstanceStatus } from 'hooks/api/getters/useInstanceStatus/useInstanceStatus'; import { useInstanceStatus } from 'hooks/api/getters/useInstanceStatus/useInstanceStatus';
import { CenteredNavLink } from './CenteredNavLink'; import { CenteredNavLink } from './CenteredNavLink';
const StyledPaper = styled(Paper)(({ theme }) => ({
marginBottom: '1rem',
borderRadius: '12.5px',
boxShadow: 'none',
padding: '0 2rem',
}));
function AdminMenu() { function AdminMenu() {
const { uiConfig } = useUiConfig(); const { uiConfig } = useUiConfig();
const { pathname } = useLocation(); const { pathname } = useLocation();
@ -13,13 +20,7 @@ function AdminMenu() {
const activeTab = pathname.split('/')[2]; const activeTab = pathname.split('/')[2];
return ( return (
<Paper <StyledPaper>
style={{
marginBottom: '1rem',
borderRadius: '12.5px',
boxShadow: 'none',
}}
>
<Tabs <Tabs
value={activeTab} value={activeTab}
variant="scrollable" variant="scrollable"
@ -120,7 +121,7 @@ function AdminMenu() {
/> />
)} )}
</Tabs> </Tabs>
</Paper> </StyledPaper>
); );
} }