Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
Ferossgp committed Jun 15, 2020
1 parent aee470b commit 9b4854a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 2 additions & 4 deletions src/quo/animated.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,9 @@
(defn loop* [opts]
(ocall redash "loop" (clj->js opts)))

(defn use-value [value]
(.useValue ^js redash value))
(def use-value (.-useValue ^js redash))

(defn use-clock []
(.useClock ^js redash))
(def use-clock (.-useClock ^js redash))

(defn snap-point [value velocity snap-points]
(.snapPoint ^js redash value velocity (to-array snap-points)))
Expand Down
8 changes: 5 additions & 3 deletions src/quo/components/bottom_sheet/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
(when visible (into [:<>] children))
(into [rn/modal props] children)))

(defn bottom-sheet-raw [props]
(defn bottom-sheet-hooks [props]
(let [{on-cancel :onCancel
disable-drag? :disableDrag?
show-handle? :showHandle?
Expand Down Expand Up @@ -167,7 +167,7 @@
(when back-button-cancel
(close-sheet)))}
[rn/view {:style styles/container
:pointer-events :box-none}
:pointer-events (if visible? :box-none :none)}
[gesture-handler/tap-gesture-handler (merge {:enabled backdrop-dismiss?}
tap-gesture-handler)
[animated/view {:style (merge (styles/backdrop)
Expand Down Expand Up @@ -201,5 +201,7 @@
:on-layout on-layout}
(into [:<>] (react/get-children children))]]]]]]])))

(def bottom-sheet-adapted (reagent/adapt-react-class bottom-sheet-hooks))

(defn bottom-sheet [props & children]
(into [:> bottom-sheet-raw props] children))
(into [bottom-sheet-adapted props] children))

0 comments on commit 9b4854a

Please sign in to comment.