0.11.1 • Published 7 years ago
jss-theme-reactor v0.11.1
jss-theme-reactor
Installation
Install jss-theme-reactor
.
$ npm install jss-theme-reactor --save
Usage
Basic example
A super simple example demonstrating the basic functionality.
import { create as createJss } from 'jss';
import preset from 'jss-preset-default';
import { createStyleManager, createStyleSheet } from 'jss-theme-reactor';
themeObj = {
fontFamily: 'Roboto',
fontSize: 12,
color: 'red',
};
styleManager = createStyleManager({
jss: createJss(preset()),
theme: themeObj,
});
styleSheet = createStyleSheet('button', (theme) => ({
root: {
color: theme.color,
fontSize: theme.fontSize,
fontFamily: theme.fontFamily,
},
}));
const classes = styleManager.render(styleSheet);
// classes.root === '.button-root-1l7rpve'
Resulting document head:
<style type="text/css" data-jss="" data-meta="button">
.button-root-1l7rpve {
color: red;
font-size: 12px;
font-family: Roboto;
}
</style>
0.11.1
7 years ago
0.11.0
7 years ago
0.10.0
7 years ago
0.9.0
7 years ago
0.9.0-alpha.1
7 years ago
0.8.2
7 years ago
0.8.1
7 years ago
0.8.0
7 years ago
0.7.0
7 years ago
0.6.0
7 years ago
0.5.3
7 years ago
0.5.2
7 years ago
0.5.1
7 years ago
0.5.0
7 years ago
0.4.1
8 years ago
0.4.0
8 years ago
0.3.0
8 years ago
0.2.0
8 years ago
0.1.0
8 years ago
0.1.0-alpha.14
8 years ago
0.1.0-alpha.13
8 years ago
0.1.0-alpha.12
8 years ago
0.1.0-alpha.11
8 years ago
0.1.0-alpha.10
8 years ago
0.1.0-alpha.9
8 years ago
0.1.0-alpha.8
8 years ago
0.1.0-alpha.7
8 years ago
0.1.0-alpha.6
8 years ago
0.1.0-alpha.5
8 years ago
0.1.0-alpha.4
8 years ago
0.1.0-alpha.3
8 years ago
0.1.0-alpha.2
8 years ago