|
|
@@ -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])))))))
|