Advertisement
dredder

Untitled

May 17th, 2018
1,184
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (defn slide-panel
  2.   []
  3.   (let [left-position-template (re-frame/subscribe [::subs/left-position-slide-panel])
  4.         menu-panel-width (re-frame/subscribe [::subs/menu-panel-width])
  5.         slide-panel-template (re-frame/subscribe [::subs/slide-panel-template])]
  6.     (fn []
  7.       [:div#menu-backdrop
  8.        {:style {:transform (str "translate(" @left-position-template "px)")}
  9.         :on-click #(if (= (.-currentTarget %) (.-target %))
  10.                      (re-frame/dispatch [::common-events/set-slide-window false nil])
  11.                      nil)}
  12.        [:div#slide-panel
  13.         {:style {:transform (str "translate(" @left-position-template "px)")
  14.                  :width @menu-panel-width}}
  15.         (case @slide-panel-template
  16.           :menu [menu-view/menu-view]
  17.           :dish [dish/dish]
  18.           [:h1 "Нет шаблона"])]])))
Advertisement
RAW Paste Data Copied
Advertisement