diff --git a/packages/react-jss/.size-snapshot.json b/packages/react-jss/.size-snapshot.json index 7af4f8136..6fd3380a7 100644 --- a/packages/react-jss/.size-snapshot.json +++ b/packages/react-jss/.size-snapshot.json @@ -1,30 +1,30 @@ { "dist/react-jss.js": { - "bundled": 132634, - "minified": 44917, - "gzipped": 13301 + "bundled": 133197, + "minified": 45116, + "gzipped": 13343 }, "dist/react-jss.min.js": { - "bundled": 100902, - "minified": 35076, - "gzipped": 10549 + "bundled": 101465, + "minified": 35274, + "gzipped": 10590 }, "dist/react-jss.cjs.js": { - "bundled": 14470, - "minified": 6688, - "gzipped": 2222 + "bundled": 14639, + "minified": 6825, + "gzipped": 2251 }, "dist/react-jss.esm.js": { - "bundled": 13788, - "minified": 6102, - "gzipped": 2102, + "bundled": 13920, + "minified": 6203, + "gzipped": 2124, "treeshaked": { "rollup": { - "code": 1964, - "import_statements": 475 + "code": 2005, + "import_statements": 516 }, "webpack": { - "code": 3358 + "code": 3433 } } } diff --git a/packages/react-jss/package.json b/packages/react-jss/package.json index c004d926c..cb89e65aa 100644 --- a/packages/react-jss/package.json +++ b/packages/react-jss/package.json @@ -45,6 +45,7 @@ "hoist-non-react-statics": "^3.2.0", "jss": "10.0.0-alpha.9", "jss-plugin-rule-value-function": "10.0.0-alpha.9", + "jss-plugin-rule-value-observable": "10.0.0-alpha.9", "jss-preset-default": "10.0.0-alpha.9", "prop-types": "^15.6.0", "theming": "^3.0.3" diff --git a/packages/react-jss/src/withStyles.js b/packages/react-jss/src/withStyles.js index d81201297..882fc662f 100644 --- a/packages/react-jss/src/withStyles.js +++ b/packages/react-jss/src/withStyles.js @@ -3,6 +3,7 @@ import React, {Component, type ComponentType, type Node} from 'react' import hoistNonReactStatics from 'hoist-non-react-statics' import {SheetsManager, type StyleSheet} from 'jss' import {getFunctionStyles} from 'jss-plugin-rule-value-function' +import {getObservableStyles} from 'jss-plugin-rule-value-observable' import {ThemeContext} from 'theming' import type {HOCProps, Options, Styles, InnerProps} from './types' @@ -142,7 +143,8 @@ export default function withStyles>( ...contextSheetOptions, index, meta: `${displayName}, ${isThemingEnabled ? 'Themed' : 'Unthemed'}, Static`, - classNamePrefix: this.classNamePrefix + classNamePrefix: this.classNamePrefix, + link: getObservableStyles(themedStyles) !== null }) this.manager.add(theme, staticSheet) // $FlowFixMe Cannot add random fields to instance of class StyleSheet