How to use the react-jss/lib/ns.sheetsRegistry 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 / test-utils / getClasses.js View on Github external
export default function getClasses(element, options = {}) {
  const sheetsRegistry = new SheetsRegistry();

  sheetsManager.clear();
  shallow(element, _extends({}, options, {
    context: _extends({
      [ns.sheetsRegistry]: sheetsRegistry
    }, options.context)
  }));

  return sheetsRegistry.registry[0].classes;
}
github mui-org / material-ui / src / test-utils / getClasses.js View on Github external
export default function getClasses(element: Object, options: Object = {}) {
  const sheetsRegistry = new SheetsRegistry();

  sheetsManager.clear();
  shallow(element, {
    ...options,
    context: {
      [ns.sheetsRegistry]: sheetsRegistry,
      ...options.context,
    },
  });

  return sheetsRegistry.registry[0].classes;
}
github deranjer / goTorrent / goTorrentWebUI / node_modules / material-ui / es / styles / withStyles.js View on Github external
meta = getDisplayName(Component);
        }

        const sheet = this.jss.createStyleSheet(styles, _extends({
          meta,
          classNamePrefix: meta,
          flip: typeof flip === 'boolean' ? flip : theme.direction === 'rtl',
          link: false
        }, this.sheetOptions, stylesCreatorSaved.options, {
          name
        }, styleSheetOptions));

        sheetManagerTheme.sheet = sheet;
        sheet.attach();

        const sheetsRegistry = this.context[ns.sheetsRegistry];
        if (sheetsRegistry) {
          sheetsRegistry.add(sheet);
        }
      }

      sheetManagerTheme.refs += 1;
    }
github mui-org / material-ui / src / styles / withStyles.js View on Github external
const sheet = this.jss.createStyleSheet(styles, {
          meta,
          classNamePrefix: meta,
          flip: typeof flip === 'boolean' ? flip : theme.direction === 'rtl',
          link: false,
          ...this.sheetOptions,
          ...stylesCreatorSaved.options,
          name,
          ...styleSheetOptions,
        });

        sheetManagerTheme.sheet = sheet;
        sheet.attach();

        const sheetsRegistry = this.context[ns.sheetsRegistry];
        if (sheetsRegistry) {
          sheetsRegistry.add(sheet);
        }
      }

      sheetManagerTheme.refs += 1;
    }
github sghall / react-compound-slider / src / styles / withStyles.js View on Github external
);
          }

          const sheet = this.jss.createStyleSheet(styles, {
            meta,
            link: false,
            ...this.sheetOptions,
            ...stylesCreator.options,
            name,
            ...styleSheetOptions
          });

          sheetManagerTheme.sheet = sheet;
          sheet.attach();

          const sheetsRegistry = this.context[ns.sheetsRegistry];
          if (sheetsRegistry) {
            sheetsRegistry.add(sheet);
          }
        }

        sheetManagerTheme.refs += 1;
      });
    }
github zubairghori / Ultimate_todo_list / react-todo-rest-api / node_modules / @material-ui / core / es / styles / withStyles.js View on Github external
if (process.env.NODE_ENV !== 'production' && !meta) {
          meta = getDisplayName(Component);
          process.env.NODE_ENV !== "production" ? warning(typeof meta === 'string', ['Material-UI: the component displayName is invalid. It needs to be a string.', `Please fix the following component: ${Component}.`].join('\n')) : void 0;
        }

        const sheet = this.jss.createStyleSheet(styles, _objectSpread({
          meta,
          classNamePrefix: meta,
          flip: typeof flip === 'boolean' ? flip : theme.direction === 'rtl',
          link: false
        }, this.sheetOptions, stylesCreatorSaved.options, {
          name
        }, styleSheetOptions));
        sheetManagerTheme.sheet = sheet;
        sheet.attach();
        const sheetsRegistry = this.context[ns.sheetsRegistry];

        if (sheetsRegistry) {
          sheetsRegistry.add(sheet);
        }
      }

      sheetManagerTheme.refs += 1;
    }