We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7b933b commit 6fc8260Copy full SHA for 6fc8260
src/utils/tailwindWrapper.js
@@ -0,0 +1,15 @@
1
+import styles from "core/index.css";
2
+
3
+/**
4
+ * Wraps className with Tailwind
5
+ *
6
+ * @param {String} tailwindClass Tailwind classes separated by spaces
7
+ * @returns {String} Wrapped Tailwind class
8
+ */
9
+export const tailwindWrapper = (tailwindClass) => {
10
+ const tailwindClassList = tailwindClass.split(" ");
11
12
+ const WrappedClassList = tailwindClassList.map((className) => styles[className]);
13
14
+ return WrappedClassList.join(" ");
15
+};
0 commit comments