improve merge class names

This commit is contained in:
codetypes committed 2024-04-28 21:03:07 +08:00
1 parent 4022f268e5
commit f09fd55343
2 files changed
+10 -9

No files matched your search

+1 -1
View File
@@ -10,6 +10,6 @@ export const writeJson = (path: string, data: any) => {
fs.writeFileSync(path, str, "utf-8");
};
export function mergeClassNames(...cls: string[]): string {
export function mergeClassNames(...cls: (string | boolean)[]): string {
return cls.filter((v) => !!v).join(" ");
}