feat(sidebars-wrapper): add option to remove vertical padding

This commit is contained in:
RadoslavDimchev 2024-04-01 08:28:48 +03:00 committed by Radoslav Dimchev
parent 99ab4c25d9
commit 295eb91286
2 changed files with 9 additions and 3 deletions

View File

@ -10,6 +10,7 @@ type SidebarsWrapperProps = {
isNotLeftSidebar?: boolean
isNotRightSidebar?: boolean
isNotSidePadding?: boolean
isNotVerticalPadding?: boolean
}
const SidebarsWrapper = ({
@ -17,6 +18,7 @@ const SidebarsWrapper = ({
isNotLeftSidebar,
isNotRightSidebar,
isNotSidePadding,
isNotVerticalPadding,
}: SidebarsWrapperProps) => {
return (
<XStack style={{ minHeight: '100vh' }}>
@ -24,8 +26,8 @@ const SidebarsWrapper = ({
<div
style={{
display: 'flex',
flexGrow: '1',
padding: `20px ${isNotSidePadding ? 0 : 20}px`,
flexGrow: 1,
padding: `${isNotVerticalPadding ? 0 : 12}px ${isNotSidePadding ? 0 : 20}px`,
overflowY: 'auto',
height: 'fit-content',
}}

View File

@ -6,7 +6,11 @@ import SidebarsWrapper from '../../components/PageWrappers/SidebarsWrapper'
const ManageValidator = () => {
return (
<SidebarsWrapper isNotRightSidebar={true} isNotSidePadding={true}>
<SidebarsWrapper
isNotRightSidebar={true}
isNotSidePadding={true}
isNotVerticalPadding={true}
>
<XStack
width={'min-content'}
alignItems="flex-start"