some changes
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import { Container, ContainerProps } from "@mantine/core";
|
||||
import { Container, ContainerProps, Box } from "@mantine/core";
|
||||
import useRouterConfig from "@/features/core/hooks/use-router-config";
|
||||
import BackButton from "@/features/core/components/back-button";
|
||||
import SettingsButton from "@/features/core/components/settings-button";
|
||||
|
||||
interface PageProps extends ContainerProps, React.PropsWithChildren {
|
||||
noPadding?: boolean;
|
||||
@@ -16,8 +18,15 @@ const Page = ({ children, noPadding, fullWidth, ...props }: PageProps) => {
|
||||
m={0}
|
||||
maw={fullWidth ? '100%' : 600}
|
||||
mx="auto"
|
||||
pos="relative"
|
||||
{...props}
|
||||
>
|
||||
{header.collapsed && header.withBackButton && (
|
||||
<BackButton offsetY={0} />
|
||||
)}
|
||||
{header.collapsed && header.settingsLink && (
|
||||
<SettingsButton to={header.settingsLink} offsetY={0} />
|
||||
)}
|
||||
{children}
|
||||
</Container>
|
||||
);
|
||||
|
||||
@@ -109,7 +109,7 @@ function SwipeableTabs({
|
||||
);
|
||||
|
||||
return (
|
||||
<Box>
|
||||
<Box style={{ touchAction: "pan-y" }}>
|
||||
<Box
|
||||
ref={setRootRef}
|
||||
pos="sticky"
|
||||
@@ -137,7 +137,7 @@ function SwipeableTabs({
|
||||
onClick={() => changeTab(index)}
|
||||
style={{
|
||||
flex: 1,
|
||||
padding: "var(--mantine-spacing-sm) var(--mantine-spacing-md)",
|
||||
padding: "var(--mantine-spacing-sm) var(--mantine-spacing-xs)",
|
||||
textAlign: "center",
|
||||
color:
|
||||
activeTab === index
|
||||
@@ -155,7 +155,7 @@ function SwipeableTabs({
|
||||
component="span"
|
||||
style={{
|
||||
display: "inline-block",
|
||||
paddingInline: "1rem",
|
||||
paddingInline: "0.5rem",
|
||||
paddingBottom: "0.25rem",
|
||||
}}
|
||||
ref={setControlRef(index)}
|
||||
@@ -176,6 +176,7 @@ function SwipeableTabs({
|
||||
overflow: "hidden",
|
||||
height: carouselHeight === "auto" ? "auto" : `${carouselHeight}px`,
|
||||
transition: "height 300ms ease",
|
||||
touchAction: "pan-y",
|
||||
}}
|
||||
>
|
||||
{tabs.map((tab, index) => (
|
||||
|
||||
Reference in New Issue
Block a user