pre-installations and preparations

This commit is contained in:
MuhammadKhalilzadeh committed 2024-05-05 11:21:00 +03:30
1 parent 3e5a0329cb
commit 201d621ac3
6977 files changed
+742826

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = composeClasses;
function composeClasses(slots, getUtilityClass, classes = undefined) {
const output = {};
Object.keys(slots).forEach(
// `Object.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.
// @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208
slot => {
output[slot] = slots[slot].reduce((acc, key) => {
if (key) {
const utilityClass = getUtilityClass(key);
if (utilityClass !== '') {
acc.push(utilityClass);
}
if (classes && classes[key]) {
acc.push(classes[key]);
}
}
return acc;
}, []).join(' ');
});
return output;
}