Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const createGenerateClassName = (themeId = 0) => {
const generateClassName = originalCreateGenerateClassName()
return (rule, sheet) => {
const displayNamePrefix = sheet
? sheet.options[RAMBLER_UI_CLASS_NAME_PREFIX]
: ''
if (!displayNamePrefix) return generateClassName(rule, sheet)
const jssId = sheet ? sheet.options.jss.id : globalJss.id
const jssCounter = jssId === globalJss.id ? '' : `-${jssId}`
const themeCounter = themeId === 0 ? '' : `-${themeId}`
return ruiPrefix + displayNamePrefix + rule.key + jssCounter + themeCounter
}
}