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

View File

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