Add utility functions for value and class joining
This commit is contained in:
5
src/core/utils.js
Normal file
5
src/core/utils.js
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
export const val = t => typeof t === "function" ? t() : t;
|
||||||
|
|
||||||
|
export const joinClass = (t, l) => typeof l === "function"
|
||||||
|
? () => `${t} ${l() || ""}`.trim()
|
||||||
|
: `${t} ${l || ""}`.trim();
|
||||||
Reference in New Issue
Block a user