import React, { createContext, FC, useContext, useState } from "react";

const DEFAULT_THEME = 'px'

export const ThemeContext = createContext({
    theme: DEFAULT_THEME
})

export const ThemeProvider: FC = ({ theme= DEFAULT_THEME, children }: any) => {
    
    return (
        <ThemeContext.Provider value={{theme}}>
            {children}
        </ThemeContext.Provider>
    )
}

export const useTheme = () => {
    const { theme } = useContext(ThemeContext)
    return [theme]
}

