How to use the jss.default.createStyleSheet function in jss

To help you get started, we’ve selected a few jss examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DefinitelyTyped / DefinitelyTyped / types / jss / jss-tests.ts View on Github external
fontFamily: 'Roboto',
		color: '#FFFFFF',
	},
	rule2: {
		fontFamily: 'Inconsolata',
		fontSize: 17,
	},
});
// $ExpectError
styleSheet.addRule('badProperty', { thisIsNotAValidProperty: 'blah', });

styleSheet.addRule('badValue', { // $ExpectError
	'align-items': Symbol(),
});

const styleSheet2 = sharedInstance.createStyleSheet({
	container: {
		background: '#000099',
	}
});

styleSheet2.classes.container; // $ExpectType string
styleSheet2.classes.notAValidKey; // $ExpectError

/* SheetsRegistry test */
const sheetsRegistry = new SheetsRegistry();
sheetsRegistry.add(styleSheet);

const secondStyleSheet = jss.createStyleSheet(
	{
		ruleWithMockObservable: {
			subscribe() {
github kynikos / wiki-monkey / src / lib / index.js View on Github external
  module.exports.jssc = (style) => jss.createStyleSheet(style, jssopts).attach()