import { Theme } from '@thematic/core' ; import { FC , ReactNode , useMemo } from 'react' ; import { ThematicContext , defaultTheme } from './ThematicContext' ; export interface ThematicProviderProps { theme ? : Theme ; children ? : ReactNode ; } /**
 * Provider component from the default context for Thematic
 */ export const ThematicProvider = ( { theme , children , } ) => { const t = useMemo ( ( ) => ( theme ? theme : defaultTheme ) , [ theme ] ) ; return ( < ThematicContext . Provider value = { t } > { children } < /ThematicContext.Provider>); } ;