Constructor
new LocaleConsumer(Component)
Parameters:
Name | Type | Description |
---|---|---|
Component |
ReactElement | The component to pass localizations to |
- Source:
- See:
Example
import { TextInput } from 'oskari-ui';
import { LocaleConsumer } from 'oskari-ui/util';
const NameInput = LocaleConsumer(({ getMessage }) => (
<TextInput placeholder={getMessage('placeholders.name')} />
));