import React, { useEffect, useState } from 'react'; import styled, { ThemeProvider } from 'styled-components'; import { Header } from 'ts/components/docs/header'; import { Footer } from 'ts/components/footer'; import { GlobalStyles } from 'ts/constants/globalStyle'; import { colors } from 'ts/style/colors'; interface ISiteWrapProps { theme?: 'dark' | 'light' | 'gray'; isFullScreen?: boolean; children: any; } interface IMainProps { isNavToggled: boolean; isFullScreen?: boolean; } export interface ThemeValuesInterface { bgColor: string; darkBgColor?: string; lightBgColor: string; introTextColor: string; textColor: string; paragraphColor: string; linkColor: string; mobileNavBgUpper: string; mobileNavBgLower: string; mobileNavColor: string; dropdownBg: string; dropdownButtonBg: string; dropdownBorderColor?: string; dropdownColor: string; headerButtonBg: string; footerBg: string; footerColor: string; } export interface ThemeInterface { [key: string]: ThemeValuesInterface; } export const SiteWrap: React.FC = props => { const { children, theme = 'dark', isFullScreen } = props; const [isMobileNavOpen, setIsMobileNavOpen] = useState(false); useEffect(() => { document.documentElement.style.overflowY = 'auto'; window.scrollTo(0, 0); }, []); const toggleMobileNav = () => setIsMobileNavOpen(!isMobileNavOpen); return ( <>
{children}