Apply theme provider for JSS
This library helps you style your react components with JSS
Install
npm install --save themed-react-jss
Usage
const provider = const ApplyTheme = provider const myTheme = sizes: padding: '10px' font: '16px' palette: font: '#000' background: '#eee' const otherTheme = sizes: font: '18px' { const sheet theme = thisprops return <button className= sheetclassesbutton style= fontSize: themesizesfont >hello</button> } // or use decorators// @injectSheet(...)const StyledButton = RawButton // Usage // Usage with overrides and customJss
Provider options
const provider =
injectSheet options
// This options passed to// jss.createStyleSheet(rules, options)// as options@ ...
Server-side rendering
You can get your styles as a string with
const jss = const resultCssString = jsssheets