@chakra-ui/react#ColorModeScript JavaScript Examples
The following examples show how to use
@chakra-ui/react#ColorModeScript.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: _document.js From benjamincarlson.io with MIT License | 6 votes |
render() {
return (
<Html lang="en">
<GoogleFonts href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&display=swap" />
<Head>
{/* Google Adsense */}
<script data-ad-client="ca-pub-8586017200531248" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
{/* Global Site Tag (gtag.js) - Google Analytics */}
<script
async
src={`https://www.googletagmanager.com/gtag/js?id=${GA_TRACKING_ID}`}
/>
<script
dangerouslySetInnerHTML={{
__html: `
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '${GA_TRACKING_ID}', {
page_path: window.location.pathname,
});
`,
}}
/>
</Head>
<body>
<ColorModeScript initialColorMode={theme.config.initialColorMode}/>
<Main />
<NextScript />
</body>
</Html>
)
}
Example #2
Source File: index.jsx From scaffold-directory with MIT License | 6 votes |
ReactDOM.render( <ChakraProvider theme={theme}> <BrowserRouter> <ColorModeScript initialColorMode={theme.config.initialColorMode} /> <App /> </BrowserRouter> </ChakraProvider>, document.getElementById("root"), );
Example #3
Source File: index.js From react-sample-projects with MIT License | 5 votes |
root.render( <StrictMode> <ColorModeScript /> <App /> </StrictMode> );