How to use the react-jss/lib/ns.jss 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 mui-org / material-ui / src / styles / withStyles.js View on Github external
constructor(props, context) {
      super(props, context);

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

      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,
github zubairghori / Ultimate_todo_list / react-todo-rest-api / node_modules / @material-ui / core / es / styles / withStyles.js View on Github external
constructor(props, context) {
      super(props, context);
      this.disableStylesGeneration = false;
      this.jss = null;
      this.sheetOptions = null;
      this.sheetsManager = sheetsManager;
      this.stylesCreatorSaved = null;
      this.theme = null;
      this.unsubscribeId = null;
      this.jss = context[ns.jss] || jss;
      const {
        muiThemeProviderOptions
      } = 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;
github deranjer / goTorrent / goTorrentWebUI / node_modules / material-ui / es / styles / withStyles.js View on Github external
constructor(props, context) {
      super(props, context);

      this.state = {};
      this.disableStylesGeneration = false;
      this.jss = null;
      this.sheetOptions = null;
      this.sheetsManager = sheetsManager;
      this.stylesCreatorSaved = null;
      this.theme = null;
      this.unsubscribeId = null;
      this.jss = this.context[ns.jss] || jss;

      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
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 = {};
    }