Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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;
}
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;
}
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;
}
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;
}
);
}
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;
});
}
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;
}