@public-ui/components
Version:
Contains all web components that belong to KoliBri - The accessible HTML-Standard.
55 lines (53 loc) • 1.27 kB
JavaScript
/*!
* KoliBri - The accessible HTML-Standard
*/
const toVal = (mix) => {
let str = '';
if (typeof mix === 'string' || typeof mix === 'number') {
str += mix;
}
else if (typeof mix === 'object' && mix !== null) {
if (Array.isArray(mix)) {
for (const item of mix) {
if (item) {
const y = toVal(item);
if (y) {
if (str) {
str += ' ';
}
str += y;
}
}
}
}
else {
for (const key in mix) {
if (mix[key]) {
if (str) {
str += ' ';
}
str += key;
}
}
}
}
return str;
};
const clsx = (...args) => {
let str = '';
for (const arg of args) {
if (arg) {
const x = toVal(arg);
if (x) {
if (str) {
str += ' ';
}
str += x;
}
}
}
return str;
};
export { clsx as c };
//# sourceMappingURL=clsx.js.map
//# sourceMappingURL=clsx.js.map