feat: better layout

This commit is contained in:
TrèsAbhi committed 2023-11-07 17:33:41 -06:00
1 parent 9e340d2e16
commit 6600bba58c
2 files changed
+222 -222

No files matched your search

+6 -7
View File
@@ -1,7 +1,7 @@
import { Theme } from '@radix-ui/themes';
import { Flex, Theme } from '@radix-ui/themes';
import { ComponentProps } from 'react';
interface PageWrapperProps extends ComponentProps<'div'> {
interface PageWrapperProps extends ComponentProps<typeof Flex> {
color?: ComponentProps<typeof Theme>['accentColor'];
}
@@ -12,20 +12,19 @@ export default function PageWrapper({
}: PageWrapperProps) {
return (
<Theme accentColor={color}>
<div
<Flex
{...props}
direction="column"
gap="4"
style={{
width: '100%',
maxWidth: 800,
margin: 'auto',
display: 'flex',
padding: 16,
flexDirection: 'column',
gap: 32,
boxSizing: 'border-box',
...style,
}}
{...props}
/>
</Theme>
);