diff --git a/lib/ui/src/components/layout/container.tsx b/lib/ui/src/components/layout/container.tsx index 845e3a3d0754..0628723a94af 100644 --- a/lib/ui/src/components/layout/container.tsx +++ b/lib/ui/src/components/layout/container.tsx @@ -569,10 +569,11 @@ class Layout extends Component { marginTop: -margin, } : { - marginLeft: -margin, + marginLeft: 1, } } axis={isPanelBottom ? 'y' : 'x'} + reverse /> )} diff --git a/lib/ui/src/components/layout/draggers.tsx b/lib/ui/src/components/layout/draggers.tsx index 4424b084fdb0..6fe6dfed7a32 100644 --- a/lib/ui/src/components/layout/draggers.tsx +++ b/lib/ui/src/components/layout/draggers.tsx @@ -3,7 +3,7 @@ import { styled } from '@storybook/theming'; export type Axis = 'x' | 'y'; -const Handle = styled.div<{ isDragging: boolean; axis: Axis }>( +const Handle = styled.div<{ isDragging: boolean; axis: Axis; reverse?: boolean }>( ({ theme, isDragging }) => ({ zIndex: 10, position: 'absolute', @@ -17,7 +17,7 @@ const Handle = styled.div<{ isDragging: boolean; axis: Axis }>( overflow: 'hidden', transition: - 'color 0.2s linear, background-position 0.2s linear, background-size 0.2s linear, background 0.2s linear', + 'color 0.2s linear, background-size 0.2s linear, background 0.2s linear, background-position 0s linear', '&:hover': { color: theme.color.secondary, }, @@ -37,7 +37,7 @@ const Handle = styled.div<{ isDragging: boolean; axis: Axis }>( width: '100%', marginTop: 0, }, - ({ axis, isDragging }) => { + ({ axis, isDragging, reverse = false }) => { if (axis === 'y') { const style = { backgroundImage: `radial-gradient(at center center,rgba(0,0,0,0.2) 0%,transparent 70%,transparent 100%)`, @@ -57,7 +57,7 @@ const Handle = styled.div<{ isDragging: boolean; axis: Axis }>( const style = { backgroundImage: `radial-gradient(at center center,rgba(0,0,0,0.2) 0%,transparent 70%,transparent 100%)`, backgroundSize: '50px 100%', - backgroundPosition: '0 50%', + backgroundPosition: reverse ? '100% 50%' : '0 50%', backgroundRepeat: 'no-repeat', }; return isDragging