import './demo4.css';
import ConfigProvider from '..';
import PropTypes from 'prop-types';
import React from 'react';
import ReactDOM from 'react-dom';
const localeSettings = {
    momentLocale: 'fr-FR',
    CustomizedComponent: {
        helloWorld: 'hello, world',
    },
};
const App = ({ children }) => (React.createElement(ConfigProvider, { prefix: "customized-", locale: localeSettings, pure: true, warning: false }, children));
App.propTypes = {
    children: PropTypes.node,
};
const Child = () => (
// @ts-ignore
React.createElement(ConfigProvider.Consumer, null, context => (React.createElement("div", { className: "context-data" },
    React.createElement("h3", null, "Context's state"),
    React.createElement("pre", null, JSON.stringify(context, undefined, 2))))));
const Demo = () => (React.createElement(App, null,
    React.createElement(Child, null)));
ReactDOM.render(React.createElement(Demo, null), document.getElementById('config-provider-demo-4'));
