2022-11-09 21:38:05 -05:00
|
|
|
"use client"
|
|
|
|
|
2022-11-10 02:11:36 -05:00
|
|
|
import { CssBaseline, GeistProvider, Page, Themes } from "@geist-ui/core/dist"
|
2022-11-09 21:38:05 -05:00
|
|
|
import { ThemeProvider } from "next-themes"
|
|
|
|
import { SkeletonTheme } from "react-loading-skeleton"
|
|
|
|
|
2022-11-11 22:17:44 -05:00
|
|
|
export function LayoutWrapper({
|
|
|
|
children,
|
|
|
|
}: {
|
|
|
|
children: React.ReactNode
|
|
|
|
}) {
|
2022-11-09 21:38:05 -05:00
|
|
|
const skeletonBaseColor = "var(--light-gray)"
|
|
|
|
const skeletonHighlightColor = "var(--lighter-gray)"
|
|
|
|
|
|
|
|
const customTheme = Themes.createFromLight({
|
|
|
|
type: "custom",
|
|
|
|
palette: {
|
|
|
|
background: "var(--bg)",
|
|
|
|
foreground: "var(--fg)",
|
|
|
|
accents_1: "var(--lightest-gray)",
|
|
|
|
accents_2: "var(--lighter-gray)",
|
|
|
|
accents_3: "var(--light-gray)",
|
|
|
|
accents_4: "var(--gray)",
|
|
|
|
accents_5: "var(--darker-gray)",
|
|
|
|
accents_6: "var(--darker-gray)",
|
|
|
|
accents_7: "var(--darkest-gray)",
|
|
|
|
accents_8: "var(--darkest-gray)",
|
|
|
|
border: "var(--light-gray)",
|
|
|
|
warning: "var(--warning)"
|
|
|
|
},
|
|
|
|
expressiveness: {
|
2022-11-11 19:33:43 -05:00
|
|
|
dropdownBoxShadow: "0 0 0 1px var(--lighter-gray)",
|
|
|
|
shadowSmall: "0 0 0 1px var(--lighter-gray)",
|
|
|
|
shadowLarge: "0 0 0 1px var(--lighter-gray)",
|
2022-11-11 22:17:44 -05:00
|
|
|
shadowMedium: "0 0 0 1px var(--lighter-gray)"
|
2022-11-09 21:38:05 -05:00
|
|
|
},
|
|
|
|
layout: {
|
|
|
|
gap: "var(--gap)",
|
|
|
|
gapHalf: "var(--gap-half)",
|
|
|
|
gapQuarter: "var(--gap-quarter)",
|
|
|
|
gapNegative: "var(--gap-negative)",
|
|
|
|
gapHalfNegative: "var(--gap-half-negative)",
|
|
|
|
gapQuarterNegative: "var(--gap-quarter-negative)",
|
|
|
|
radius: "var(--radius)"
|
|
|
|
},
|
|
|
|
font: {
|
|
|
|
mono: "var(--font-mono)",
|
|
|
|
sans: "var(--font-sans)"
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
return (
|
|
|
|
<GeistProvider themes={[customTheme]} themeType={"custom"}>
|
|
|
|
<SkeletonTheme
|
|
|
|
baseColor={skeletonBaseColor}
|
|
|
|
highlightColor={skeletonHighlightColor}
|
|
|
|
>
|
|
|
|
<ThemeProvider
|
|
|
|
disableTransitionOnChange
|
|
|
|
cookieName="drift-theme"
|
|
|
|
attribute="data-theme"
|
|
|
|
>
|
|
|
|
<CssBaseline />
|
2022-11-11 22:17:44 -05:00
|
|
|
<Page width={"100%"} style={{
|
|
|
|
marginTop: "0 !important",
|
|
|
|
paddingTop: "0 !important"
|
|
|
|
}}>
|
|
|
|
{children}
|
2022-11-10 02:11:36 -05:00
|
|
|
</Page>
|
2022-11-09 21:38:05 -05:00
|
|
|
</ThemeProvider>
|
|
|
|
</SkeletonTheme>
|
|
|
|
</GeistProvider>
|
|
|
|
)
|
|
|
|
}
|