UNPKG

@hhgtech/hhg-components

Version:
19 lines (16 loc) 631 B
import { T as TranslationsContext } from './translationsContext-18f7b7e0.js'; export { T as TranslationsContext } from './translationsContext-18f7b7e0.js'; import React__default, { useMemo } from 'react'; const TranslationsProvider = ({ locale = 'en-PH', values, children, }) => { const contextValue = useMemo(() => { if (!values) { return null; } return { locale, values, }; }, [locale, values]); return (React__default.createElement(TranslationsContext.Provider, { value: contextValue }, children)); }; export { TranslationsProvider };