You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
699 B
22 lines
699 B
import { __read } from "tslib";
|
|
export var classNames = function (cls, prefix) {
|
|
var PREFIX = function (str) { return "".concat(prefix, "-").concat(str); };
|
|
var obj = Object.fromEntries(Object.entries(cls).map(function (_a) {
|
|
var _b = __read(_a, 2), k = _b[0], v = _b[1];
|
|
var name = PREFIX(v);
|
|
return [
|
|
k,
|
|
{
|
|
name: name,
|
|
class: ".".concat(name),
|
|
id: "#".concat(name),
|
|
toString: function () {
|
|
return name;
|
|
},
|
|
},
|
|
];
|
|
}));
|
|
Object.assign(obj, { prefix: PREFIX });
|
|
return obj;
|
|
};
|
|
//# sourceMappingURL=classnames.js.map
|