diff options
author | Miguel Ángel Moreno <mail@migalmoreno.com> | 2024-02-18 17:40:12 +0100 |
---|---|---|
committer | Miguel Ángel Moreno <mail@migalmoreno.com> | 2024-02-18 17:40:12 +0100 |
commit | 57875a7b1069a2f87c354e0589f12f54fe5e8c4b (patch) | |
tree | 2e767668f63f907cebc5818b1f8cc420d9d07cb6 /src/frontend | |
parent | 14123bb61c09ef0847ac8ff87783982ebddc4568 (diff) |
chore(frontend): tweak extra-classes argument in player button
Diffstat (limited to 'src/frontend')
-rw-r--r-- | src/frontend/tubo/components/player.cljs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/frontend/tubo/components/player.cljs b/src/frontend/tubo/components/player.cljs index 23ef45d..0103840 100644 --- a/src/frontend/tubo/components/player.cljs +++ b/src/frontend/tubo/components/player.cljs @@ -17,12 +17,12 @@ :value @elapsed-time}]) (defn button - [icon on-click-cb & {:keys [disabled? show-on-mobile? extra-styles]}] + [icon on-click & {:keys [disabled? show-on-mobile? extra-classes]}] [:button.outline-none.focus:ring-transparent.px-2.pt-1 - {:class (let [styles (apply conj (when disabled? ["opacity-50" "cursor-auto"]) - (when-not show-on-mobile? ["hidden" "lg:block"]))] - (apply str (if (> (count extra-styles) 1) (interpose " " (conj styles extra-styles)) (interpose " " styles)))) - :on-click on-click-cb} + {:class (let [classes (apply conj (when disabled? ["opacity-50" "cursor-auto"]) + (when-not show-on-mobile? ["hidden" "lg:block"]))] + (apply str (if (> (count extra-classes) 1) (interpose " " (conj classes extra-classes)) (interpose " " classes)))) + :on-click on-click} icon]) (defn loop-button @@ -39,7 +39,7 @@ :top "-4px"}} "1"])] #(rf/dispatch [::events/toggle-loop-playback]) - :extra-styles "text-sm" + :extra-classes "text-sm" :show-on-mobile? show-on-mobile?]) (defn volume-slider [player volume-level muted? service-color] |