react-motif
v0.0.5
Published
React provider for themeable components
Maintainers
Readme
react-motif 0.0.6
React provider for themeable components
yarn add react-motif npm install react-motifMethods
motifProvider(motif)
Creates the motif context on an Component.
Parameters
| Name | Type | Description | |
| ---- | ---- | ----------- | -------- |
| motif | Object | The context that should be exported. | |
Returns
functionReturns the wrapper function that applies the context.
withMotif(Component)
Extracts the motif context on an Component.
Parameters
| Name | Type | Description | |
| ---- | ---- | ----------- | -------- |
| Component | Object | The component that will use the context. | |
Returns
ObjectReturns Component with access to the context.
