We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e4fc7c1 commit 4482946Copy full SHA for 4482946
GUI/ETVR/src/utils/utils.ts
@@ -34,6 +34,22 @@ export const ActiveStatus = (activeStatus: CameraStatus) => {
34
}
35
36
37
+/**
38
+ * @description Returns a string of classes based on the boolean value
39
+ * @param classes
40
+ * @param boolean
41
+ * @example
42
+ * ```tsx
43
+ * <ChevronDownIcon
44
+ * class={classNames(
45
+ * isOpen() && 'text-opacity-70',
46
+ * 'ml-2 h-5 w-5 text-orange-300 group-hover:text-opacity-80 transition ease-in-out duration-150',
47
+ * )}
48
+ * aria-hidden="true"
49
+ * />
50
+ * ```
51
+ * @returns string of classes
52
+ */
53
export const classNames = (...classes: (string | boolean | undefined)[]): string => {
54
return classes.filter(Boolean).join(' ')
55
0 commit comments