2022-03-23 21:47:21 -04:00
|
|
|
import { GeistProvider, CssBaseline, Themes } from "@geist-ui/core"
|
2022-03-23 21:21:46 -04:00
|
|
|
import type { NextComponentType, NextPageContext } from "next"
|
|
|
|
import { SkeletonTheme } from "react-loading-skeleton"
|
|
|
|
import { useTheme } from 'next-themes'
|
|
|
|
const App = ({
|
|
|
|
Component,
|
|
|
|
pageProps,
|
|
|
|
}: {
|
|
|
|
Component: NextComponentType<NextPageContext, any, any>
|
|
|
|
pageProps: any
|
|
|
|
}) => {
|
|
|
|
const skeletonBaseColor = 'var(--light-gray)'
|
|
|
|
const skeletonHighlightColor = 'var(--lighter-gray)'
|
|
|
|
|
2022-03-23 21:47:21 -04:00
|
|
|
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)',
|
2022-03-23 22:54:54 -04:00
|
|
|
border: 'var(--light-gray)',
|
2022-03-23 21:47:21 -04:00
|
|
|
},
|
|
|
|
font: {
|
|
|
|
mono: 'var(--font-mono)',
|
|
|
|
sans: 'var(--font-sans)',
|
|
|
|
}
|
|
|
|
}
|
|
|
|
)
|
|
|
|
return (<GeistProvider themes={[customTheme]} themeType={"custom"} >
|
2022-03-23 21:21:46 -04:00
|
|
|
<SkeletonTheme baseColor={skeletonBaseColor} highlightColor={skeletonHighlightColor}>
|
|
|
|
<CssBaseline />
|
|
|
|
<Component {...pageProps} />
|
|
|
|
</SkeletonTheme>
|
2022-03-23 21:47:21 -04:00
|
|
|
</GeistProvider >)
|
2022-03-23 21:21:46 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
export default App
|