rsuite-table
Advanced tools
Comparing version 3.1.3 to 3.1.4
@@ -6,3 +6,3 @@ 'use strict'; | ||
}); | ||
exports.prefix = exports.defaultClassPrefix = exports.globalKey = undefined; | ||
exports.prefix = exports.defaultClassPrefix = exports.getClassNamePrefix = exports.globalKey = undefined; | ||
@@ -24,4 +24,10 @@ var _isArray2 = require('lodash/isArray'); | ||
var globalKey = exports.globalKey = 'rs-'; | ||
var getClassNamePrefix = exports.getClassNamePrefix = function getClassNamePrefix() { | ||
if (typeof __RSUITE_CLASSNAME_PREFIX__ !== 'undefined') { | ||
return __RSUITE_CLASSNAME_PREFIX__; | ||
} | ||
return globalKey; | ||
}; | ||
var defaultClassPrefix = exports.defaultClassPrefix = function defaultClassPrefix(name) { | ||
return '' + globalKey + name; | ||
return '' + getClassNamePrefix() + name; | ||
}; | ||
@@ -28,0 +34,0 @@ var prefix = exports.prefix = (0, _curry3.default)(function (pre, className) { |
{ | ||
"name": "rsuite-table", | ||
"version": "3.1.3", | ||
"version": "3.1.4", | ||
"description": "A React table component", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -5,3 +5,9 @@ import _ from 'lodash'; | ||
export const globalKey = 'rs-'; | ||
export const defaultClassPrefix = name => `${globalKey}${name}`; | ||
export const getClassNamePrefix = () => { | ||
if (typeof __RSUITE_CLASSNAME_PREFIX__ !== 'undefined') { | ||
return __RSUITE_CLASSNAME_PREFIX__; | ||
} | ||
return globalKey; | ||
}; | ||
export const defaultClassPrefix = name => `${getClassNamePrefix()}${name}`; | ||
export const prefix = _.curry((pre: string, className: string | Array<string>) => { | ||
@@ -8,0 +14,0 @@ if (!pre || !className) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
172142
3797