How to use the react-jss/lib/ns.sheetOptions function in react-jss

To help you get started, we’ve selected a few react-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 deranjer / goTorrent / goTorrentWebUI / node_modules / material-ui / es / styles / withStyles.js View on Github external
const { muiThemeProviderOptions } = this.context;
      if (muiThemeProviderOptions) {
        if (muiThemeProviderOptions.sheetsManager) {
          this.sheetsManager = muiThemeProviderOptions.sheetsManager;
        }

        this.disableStylesGeneration = muiThemeProviderOptions.disableStylesGeneration;
      }

      // Attach the stylesCreator to the instance of the component as in the context
      // of react-hot-loader the hooks can be executed in a different closure context:
      // https://github.com/gaearon/react-hot-loader/blob/master/src/patch.dev.js#L107
      this.stylesCreatorSaved = stylesCreator;
      this.sheetOptions = _extends({
        generateClassName
      }, this.context[ns.sheetOptions]);
      // We use || as the function call is lazy evaluated.
      this.theme = listenToTheme ? themeListener.initial(context) || getDefaultTheme() : noopTheme;
    }
github mui-org / material-ui / src / styles / withStyles.js View on Github external
const { muiThemeProviderOptions } = this.context;
      if (muiThemeProviderOptions) {
        if (muiThemeProviderOptions.sheetsManager) {
          this.sheetsManager = muiThemeProviderOptions.sheetsManager;
        }

        this.disableStylesGeneration = muiThemeProviderOptions.disableStylesGeneration;
      }

      // Attach the stylesCreator to the instance of the component as in the context
      // of react-hot-loader the hooks can be executed in a different closure context:
      // https://github.com/gaearon/react-hot-loader/blob/master/src/patch.dev.js#L107
      this.stylesCreatorSaved = stylesCreator;
      this.sheetOptions = {
        generateClassName,
        ...this.context[ns.sheetOptions],
      };
      // We use || as the function call is lazy evaluated.
      this.theme = listenToTheme ? themeListener.initial(context) || getDefaultTheme() : noopTheme;

      this.attach(this.theme);
    }
github zubairghori / Ultimate_todo_list / react-todo-rest-api / node_modules / @material-ui / core / es / styles / withStyles.js View on Github external
if (muiThemeProviderOptions) {
        if (muiThemeProviderOptions.sheetsManager) {
          this.sheetsManager = muiThemeProviderOptions.sheetsManager;
        }

        this.disableStylesGeneration = muiThemeProviderOptions.disableStylesGeneration;
      } // Attach the stylesCreator to the instance of the component as in the context
      // of react-hot-loader the hooks can be executed in a different closure context:
      // https://github.com/gaearon/react-hot-loader/blob/master/src/patch.dev.js#L107


      this.stylesCreatorSaved = stylesCreator;
      this.sheetOptions = _objectSpread({
        generateClassName
      }, context[ns.sheetOptions]); // We use || as the function call is lazy evaluated.

      this.theme = listenToTheme ? themeListener.initial(context) || getDefaultTheme() : noopTheme;
      this.attach(this.theme);
      this.cacheClasses = {
        // Cache for the finalized classes value.
        value: null,
        // Cache for the last used classes prop pointer.
        lastProp: null,
        // Cache for the last used rendered classes pointer.
        lastJSS: {}
      };
    }
github sghall / react-compound-slider / src / styles / withStyles.js View on Github external
constructor(props, context) {
      super(props, context);

      this.jss = this.context[ns.jss] || jss;

      this.sheetsManager = this.context.sheetsManager || sheetsManager;
      this.stylesCreators = stylesCreators;

      this.sheetOptions = {
        generateClassName,
        ...this.context[ns.sheetOptions]
      };

      this.theme = themeListener.initial(context) || getDefaultTheme();
      this.state = {};
    }