Skip to content

Commit 55b51a2

Browse files
take implementation changes back
1 parent 222fb7d commit 55b51a2

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/PageLayout/PageLayout.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ const Pane = React.forwardRef<HTMLDivElement, React.PropsWithChildren<PageLayout
564564
{
565565
'aria-label': label,
566566
'aria-labelledby': labelledBy,
567-
position: responsivePosition = undefined,
567+
position: responsivePosition = 'end',
568568
positionWhenNarrow = 'inherit',
569569
width = 'medium',
570570
minWidth = 256,
@@ -712,10 +712,12 @@ const Pane = React.forwardRef<HTMLDivElement, React.PropsWithChildren<PageLayout
712712
{
713713
// Narrow viewports
714714
display: isHidden ? 'none' : 'flex',
715-
order: position !== undefined ? panePositions[position] : undefined,
715+
order: panePositions[position],
716716
width: '100%',
717717
marginX: 0,
718-
718+
...(position === 'end'
719+
? {flexDirection: 'column', marginTop: SPACING_MAP[rowGap]}
720+
: {flexDirection: 'column-reverse', marginBottom: SPACING_MAP[rowGap]}),
719721
// Regular and wide viewports
720722
[`@media screen and (min-width: ${theme.breakpoints[1]})`]: {
721723
width: 'auto',
@@ -729,7 +731,9 @@ const Pane = React.forwardRef<HTMLDivElement, React.PropsWithChildren<PageLayout
729731
maxHeight: 'var(--sticky-pane-height)',
730732
}
731733
: {}),
732-
...(position === 'end' ? {flexDirection: 'row'} : {flexDirection: 'row-reverse'}),
734+
...(position === 'end'
735+
? {flexDirection: 'row', marginLeft: SPACING_MAP[columnGap]}
736+
: {flexDirection: 'row-reverse', marginRight: SPACING_MAP[columnGap]}),
733737
},
734738
},
735739
sx,

0 commit comments

Comments
 (0)