浏览代码

fix: set min-height for content in bottom sheet

Tienson Qin 2 月之前
父节点
当前提交
45d51c33e1
共有 1 个文件被更改,包括 11 次插入10 次删除
  1. 11 10
      src/main/mobile/components/popup.cljs

+ 11 - 10
src/main/mobile/components/popup.cljs

@@ -99,18 +99,19 @@
                                         (let [progress (gobj/get data "progress")]
                                           (js/Math.min (* progress 0.9) 0.9)))}}))
        (silkhq/bottom-sheet-content
-        {:class (str "flex flex-col items-center p-2"
-                     (when-not (or quick-add? action-sheet?) " h-2/5"))}
+        {:class "flex flex-col items-center p-2"}
         (silkhq/bottom-sheet-handle)
         (let [title (or (:title opts) (when (string? content-fn) content-fn))
-              content (if (fn? content-fn) (content-fn)
-                          (if-let [buttons (and action-sheet? (:buttons opts))]
-                            [:div.-mx-2
-                             (for [{:keys [role text]} buttons]
-                               (ui/menu-link {:on-click #(some-> (:on-action opts) (apply [{:role role}]))
-                                              :data-role role}
-                                             [:span.text-lg.flex.items-center text]))]
-                            (when-not (string? content-fn) content-fn)))]
+              content (if (fn? content-fn)
+                        [:div {:style {:min-height 300}}
+                         (content-fn)]
+                        (if-let [buttons (and action-sheet? (:buttons opts))]
+                          [:div.-mx-2
+                           (for [{:keys [role text]} buttons]
+                             (ui/menu-link {:on-click #(some-> (:on-action opts) (apply [{:role role}]))
+                                            :data-role role}
+                                           [:span.text-lg.flex.items-center text]))]
+                          (when-not (string? content-fn) content-fn)))]
           [:div.w-full.app-silk-popup-content-inner.p-2
            (when title [:h2.py-2.opacity-40 title])
            content])))))))