Constructor
new ThemeConsumer(Component)
Parameters:
Name | Type | Description |
---|---|---|
Component |
ReactElement | The component to pass theme to |
- Source:
- See:
Example
import { TextInput } from 'oskari-ui';
import { ThemeConsumer } from 'oskari-ui/util';
const ColoredInput = ThemeConsumer(({ theme }) => (
<TextInput style={{ background-color: theme.color.primary }}/>
));