aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMiguel Ángel Moreno <mail@migalmoreno.com>2024-11-23 20:08:03 +0100
committerMiguel Ángel Moreno <mail@migalmoreno.com>2024-11-23 20:12:48 +0100
commite7ba89551c2fa63ad2aa8ffa100fe1fb6ee9afc7 (patch)
tree3b39b50ac442aacd7ab61f332306f1b3688c2aa5 /src
parent24252c817204b427ea1341f1f086a82398e36702 (diff)
feat: don't show menu item icon container if it's not provided
Diffstat (limited to 'src')
-rw-r--r--src/frontend/tubo/components/layout.cljs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/frontend/tubo/components/layout.cljs b/src/frontend/tubo/components/layout.cljs
index d72d76d..614c7b6 100644
--- a/src/frontend/tubo/components/layout.cljs
+++ b/src/frontend/tubo/components/layout.cljs
@@ -138,8 +138,9 @@
(defn menu-item
[{:keys [label icon on-click link] :as item}]
(let [content [:<>
- [:span.text-xs.min-w-4.w-4.flex.justify-center.items-center
- icon]
+ (when icon
+ [:span.text-xs.min-w-4.w-4.flex.justify-center.items-center
+ icon])
[:span.whitespace-nowrap label]]
classes ["relative" "flex" "items-center" "gap-x-3"
"hover:bg-neutral-200"