diff options
author | Miguel Ángel Moreno <mail@migalmoreno.com> | 2024-06-04 14:08:47 +0200 |
---|---|---|
committer | Miguel Ángel Moreno <mail@migalmoreno.com> | 2024-06-04 14:08:47 +0200 |
commit | 906bd96c1e5b0449099b8161792c9baa2ffc18e4 (patch) | |
tree | aef4bce4cbcc333c1760835af15e2b41c9dc3751 | |
parent | c015fb204ef52e080cfbe621dc6e9eba44825124 (diff) |
feat: simplify show more container
-rw-r--r-- | src/frontend/tubo/components/layout.cljs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/frontend/tubo/components/layout.cljs b/src/frontend/tubo/components/layout.cljs index c9fdd70..8121853 100644 --- a/src/frontend/tubo/components/layout.cljs +++ b/src/frontend/tubo/components/layout.cljs @@ -197,15 +197,13 @@ (.unobserve @!resize-observer @!text-container)) :reagent-render (fn [open? text on-open] - [:div.py-3.flex.flex-wrap.min-w-full - [:div {:dangerouslySetInnerHTML {:__html text} - :class (when-not open? "line-clamp-2") - :ref #(reset! !text-container %)}] + [:div.py-3.min-w-full + [:span.text-clip.pr-2 + {:dangerouslySetInnerHTML {:__html text} + :class (when-not open? "line-clamp-2") + :ref #(reset! !text-container %)}] (when (or @text-clamped? open?) - [:div.flex.justify-center.min-w-full.py-4 - [secondary-button - (if (not open?) "Show More" "Show Less") - on-open]])])}))) + [:button.font-bold {:on-click on-open} (str "show " (if open? "less" "more"))])])}))) (defn error [{:keys [failure parse-error status status-text]} cb] [:div.flex.flex-auto.h-full.items-center.justify-center |