init
This commit is contained in:
15
src/components/page.tsx
Normal file
15
src/components/page.tsx
Normal file
@@ -0,0 +1,15 @@
|
||||
import { Container, ContainerProps } from "@mantine/core";
|
||||
import useHeaderConfig from "@/features/core/hooks/use-header-config";
|
||||
|
||||
interface PageProps extends ContainerProps, React.PropsWithChildren {
|
||||
noPadding?: boolean;
|
||||
}
|
||||
|
||||
const Page = ({ children, noPadding, ...props }: PageProps) => {
|
||||
const headerConfig = useHeaderConfig();
|
||||
return <Container px={noPadding ? 0 : 'md'} pt={headerConfig.collapsed ? 60 : 0} pb={20} m={0} maw={600} mx='auto' {...props}>
|
||||
{children}
|
||||
</Container>
|
||||
}
|
||||
|
||||
export default Page;
|
||||
Reference in New Issue
Block a user