UNPKG

wix-style-react

Version:
19 lines 1.06 kB
import React from 'react'; import PropTypes from 'prop-types'; import { WixStyleReactEnvironmentContext } from './context'; /** A wrapper component for an app to hold cross library global configuration such as locale, rtl and others */ const WixStyleReactEnvironmentProvider = ({ locale = 'en', pageHeaderId, children, }) => { return (React.createElement(WixStyleReactEnvironmentContext.Provider, { value: { locale, pageHeaderId } }, children)); }; WixStyleReactEnvironmentProvider.displayName = 'WixStyleReactEnvironmentProvider'; WixStyleReactEnvironmentProvider.propTypes = { /** Define the user locale to be used and effect some translation and localization (like DatePicker) - this should be compliant to Intl language codes*/ locale: PropTypes.string, /** Define id that will be applied to the header of a main page */ pageHeaderId: PropTypes.string, /** any content to be displayed */ children: PropTypes.node, }; export default WixStyleReactEnvironmentProvider; //# sourceMappingURL=WixStyleReactEnvironmentProvider.js.map