|
|
@@ -101,19 +101,26 @@
|
|
|
(silkhq/bottom-sheet-content
|
|
|
{: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)
|
|
|
- [:div {:style (cond-> {}
|
|
|
- (or (nil? default-height) (number? default-height))
|
|
|
- (assoc :min-height (or default-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])))))))
|
|
|
+ (silkhq/scroll
|
|
|
+ {:as-child true}
|
|
|
+ (silkhq/scroll-view
|
|
|
+ {:class "app-silk-scroll-view overflow-y-scroll"
|
|
|
+ :scrollGestureTrap {:yEnd true}
|
|
|
+ :style {:min-height (if (number? default-height)
|
|
|
+ default-height
|
|
|
+ 400)
|
|
|
+ :max-height "80vh"}}
|
|
|
+ (silkhq/scroll-content
|
|
|
+ (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)))]
|
|
|
+ [:div.w-full.app-silk-popup-content-inner.p-2
|
|
|
+ (when title [:h2.py-2.opacity-40 title])
|
|
|
+ content]))))))))))
|