// node modules
import React, { FC, ReactNode } from 'react';

import { theming, defaultTheme, ThemeProps } from "../../theme";

export interface ThemeProviderProps {
    theme?: ThemeProps
    children: ReactNode
}

export const ThemeProvider: FC<ThemeProviderProps> = ({ theme, children }: ThemeProviderProps) => {
    const { ThemeProvider } = theming

    return (
        <ThemeProvider theme={theme || defaultTheme}>
            {children}
        </ThemeProvider>
    )
};
