import React, { createContext, useContext, useState } from 'react' import { ThemeProvider as ThemeProviderStyled } from 'styled-components' type ITheme = any; type IThemeContext = [ITheme, React.Dispatch>]; const ThemeContext = createContext([[], () => null]); export const ThemeProvider = ({ children, ...props }: any) => { const [theme, setTheme] = useState(props.theme); return ( {children} ) } export const useTheme = () => { const themeManager = useContext(ThemeContext) return themeManager || [{}] }