Handle shifts in layout components
This commit is contained in:
@@ -13,6 +13,7 @@ import {
|
|||||||
useBreakpoints,
|
useBreakpoints,
|
||||||
useGutterStyles,
|
useGutterStyles,
|
||||||
useTheme,
|
useTheme,
|
||||||
|
web,
|
||||||
} from '#/alf'
|
} from '#/alf'
|
||||||
import {Button, ButtonIcon} from '#/components/Button'
|
import {Button, ButtonIcon} from '#/components/Button'
|
||||||
import {ArrowLeft_Stroke2_Corner0_Rounded as ArrowLeft} from '#/components/icons/Arrow'
|
import {ArrowLeft_Stroke2_Corner0_Rounded as ArrowLeft} from '#/components/icons/Arrow'
|
||||||
@@ -39,6 +40,14 @@ export function Outer({children}: {children: React.ReactNode}) {
|
|||||||
a.py_sm,
|
a.py_sm,
|
||||||
t.atoms.border_contrast_low,
|
t.atoms.border_contrast_low,
|
||||||
gtMobile && [a.mx_auto, {maxWidth: 600}],
|
gtMobile && [a.mx_auto, {maxWidth: 600}],
|
||||||
|
web({
|
||||||
|
transform: [
|
||||||
|
{
|
||||||
|
translateX:
|
||||||
|
'calc(-1 * var(--removed-body-scroll-bar-size, 0px) / 2)',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}),
|
||||||
]}>
|
]}>
|
||||||
{children}
|
{children}
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -142,6 +142,10 @@ export const WebCenterBorders = React.forwardRef(function LayoutContent() {
|
|||||||
{
|
{
|
||||||
translateX: '-50%',
|
translateX: '-50%',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
translateX:
|
||||||
|
'calc(-1 * var(--removed-body-scroll-bar-size, 0px) / 2)',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
]}
|
]}
|
||||||
@@ -165,6 +169,14 @@ export const Center = React.forwardRef(function LayoutContent(
|
|||||||
maxWidth: 600,
|
maxWidth: 600,
|
||||||
},
|
},
|
||||||
style,
|
style,
|
||||||
|
web({
|
||||||
|
transform: [
|
||||||
|
{
|
||||||
|
translateX:
|
||||||
|
'calc(-1 * var(--removed-body-scroll-bar-size, 0px) / 2)',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}),
|
||||||
]}
|
]}
|
||||||
{...props}>
|
{...props}>
|
||||||
{children}
|
{children}
|
||||||
|
|||||||
Reference in New Issue
Block a user