feat: per-page theming

This commit is contained in:
TrèsAbhi committed 2023-11-07 10:06:15 -06:00
1 parent bd1e17bac9
commit 1bb83da253
6 files changed
+106 -97

No files matched your search

@@ -1,10 +1,10 @@
import { theme } from '../../../stitches.config';
export interface GapProps {
number: number;
message: string;
}
export function Gap({ number }: GapProps) {
export function Gap({ message: number }: GapProps) {
return (
<div
style={{
@@ -22,7 +22,7 @@ export function Gap({ number }: GapProps) {
fontSize: 16,
}}
>
+ {number.toLocaleString()} more
{number.toLocaleString()}
</span>
</div>
);
+23 -15
View File
@@ -1,24 +1,32 @@
import { Theme } from '@radix-ui/themes';
import { ComponentProps } from 'react';
interface PageWrapperProps extends ComponentProps<'div'> {
color?: ComponentProps<typeof Theme>['accentColor'];
}
export default function PageWrapper({
style,
color,
...props
}: ComponentProps<'div'>) {
}: PageWrapperProps) {
return (
<div
style={{
width: '100%',
maxWidth: 800,
margin: 'auto',
display: 'flex',
padding: 16,
flexDirection: 'column',
gap: 16,
boxSizing: 'border-box',
<Theme accentColor={color}>
<div
style={{
width: '100%',
maxWidth: 800,
margin: 'auto',
display: 'flex',
padding: 16,
flexDirection: 'column',
gap: 16,
boxSizing: 'border-box',
...style,
}}
{...props}
/>
...style,
}}
{...props}
/>
</Theme>
);
}