website refactor
This commit is contained in:
@@ -5,11 +5,13 @@ import { Container } from './Container';
|
||||
export interface ContentViewportProps {
|
||||
children: ReactNode;
|
||||
padding?: 'none' | 'sm' | 'md' | 'lg';
|
||||
fullWidth?: boolean;
|
||||
}
|
||||
|
||||
export const ContentViewport = ({
|
||||
children,
|
||||
padding = 'md'
|
||||
padding = 'md',
|
||||
fullWidth = false
|
||||
}: ContentViewportProps) => {
|
||||
const paddingMap: Record<string, any> = {
|
||||
none: 0,
|
||||
@@ -20,7 +22,7 @@ export const ContentViewport = ({
|
||||
|
||||
return (
|
||||
<Box as="main" flex={1} overflow="auto">
|
||||
<Container size="xl">
|
||||
<Container size={fullWidth ? 'full' : 'xl'}>
|
||||
<Box paddingY={paddingMap[padding]}>
|
||||
{children}
|
||||
</Box>
|
||||
|
||||
Reference in New Issue
Block a user