mirror of
https://git.rdcenter.ru/RDCenter/skb-kit.git
synced 2026-12-05 03:39:45 +00:00
фикс билда
This commit is contained in:
1 parent
968b0b8c82
commit
af763e5865
17 files changed
+224
-134
No files matched your search
@@ -1,34 +1,34 @@
|
||||
type Mods = Record<string, boolean | string>;
|
||||
|
||||
export function classNames(
|
||||
cls: string,
|
||||
mods?: Mods,
|
||||
additional?: string[] | undefined[],
|
||||
cls: string,
|
||||
mods?: Mods,
|
||||
additional?: string[] | undefined[]
|
||||
): string {
|
||||
if (additional && mods) {
|
||||
return [
|
||||
cls,
|
||||
...additional.filter(Boolean),
|
||||
Object.entries(mods)
|
||||
.filter(([cls, value]) => Boolean(value))
|
||||
.map(([className, value]) => className)
|
||||
.join(' '),
|
||||
].join(' ');
|
||||
}
|
||||
if (additional && !mods) {
|
||||
return [cls, ...additional.filter(Boolean)].join(' ');
|
||||
}
|
||||
if (!additional && mods) {
|
||||
return [
|
||||
cls,
|
||||
Object.entries(mods)
|
||||
.filter(([cls, value]) => Boolean(value))
|
||||
.map(([className, value]) => className),
|
||||
].join(' ');
|
||||
}
|
||||
return [cls].join(' ');
|
||||
if (additional && mods) {
|
||||
return [
|
||||
cls,
|
||||
...additional.filter(Boolean),
|
||||
Object.entries(mods)
|
||||
.filter(([value]) => Boolean(value))
|
||||
.map(([className]) => className)
|
||||
.join(" "),
|
||||
].join(" ");
|
||||
}
|
||||
if (additional && !mods) {
|
||||
return [cls, ...additional.filter(Boolean)].join(" ");
|
||||
}
|
||||
if (!additional && mods) {
|
||||
return [
|
||||
cls,
|
||||
Object.entries(mods)
|
||||
.filter(([value]) => Boolean(value))
|
||||
.map(([className]) => className),
|
||||
].join(" ");
|
||||
}
|
||||
return [cls].join(" ");
|
||||
}
|
||||
|
||||
classNames('remove-btn', { hovered: true, selectable: true, red: false }, [
|
||||
'pdg',
|
||||
classNames("remove-btn", { hovered: true, selectable: true, red: false }, [
|
||||
"pdg",
|
||||
]);
|
||||
Reference in new issue
Block a user