Enhance a React component with styles.
npm install --save react-with-style
import withStyle from 'react-with-style'
import MyComponent from './MyComponent'
export default withStyle({
textAlign: 'center'
})(MyComponent)
Passes additional styles to the wrapped component. The provided styles take precedence over styles from the owner.
- [
style
] (Object): Styles to pass to the wrapped component.
MIT