Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defn slide-panel
- []
- (let [left-position-template (re-frame/subscribe [::subs/left-position-slide-panel])
- menu-panel-width (re-frame/subscribe [::subs/menu-panel-width])
- slide-panel-template (re-frame/subscribe [::subs/slide-panel-template])]
- (fn []
- [:div#menu-backdrop
- {:style {:transform (str "translate(" @left-position-template "px)")}
- :on-click #(if (= (.-currentTarget %) (.-target %))
- (re-frame/dispatch [::common-events/set-slide-window false nil])
- nil)}
- [:div#slide-panel
- {:style {:transform (str "translate(" @left-position-template "px)")
- :width @menu-panel-width}}
- (case @slide-panel-template
- :menu [menu-view/menu-view]
- :dish [dish/dish]
- [:h1 "Нет шаблона"])]])))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement