UNPKG

terra-search-field

Version:

A search component with a field that automatically performs a search callback after user input.

15 lines (10 loc) 544 B
/* eslint-disable react/jsx-boolean-value, import/no-extraneous-dependencies */ import { IntlProvider, intlShape } from 'react-intl'; import messages from '../../translations/en-US.json'; const locale = 'en-US'; const intlProvider = new IntlProvider({ locale, messages }, {}); const { intl } = intlProvider.getChildContext(); const shallowContext = { context: { intl } }; const mountContext = { context: { intl }, childContextTypes: { intl: intlShape } }; const intlContexts = { shallowContext, mountContext }; export default intlContexts;