Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattsfrey/c2eb85d5f1b3d891f7943f84dc783dc8 to your computer and use it in GitHub Desktop.
Save mattsfrey/c2eb85d5f1b3d891f7943f84dc783dc8 to your computer and use it in GitHub Desktop.
Reagent remounting continuously
(defn import-panel []
(let [abs- (abd/abs-)]
(fn []
[:div {:style {:margin-top "40px"
:width "100%"
:max-width "800px"
:min-width "400px"}}
[:div {:style {:margin-left "4px"
:font-size "11px"
:letter-spacing "1.4px"
:color (style/color :grey :shade-2)
:font-weight style/font-bold-weight}}
"IMPORT FROM FILES"]
[:div {:style {:margin-top "10px"
:border (str "1px solid " (style/color :grey :shade-6))
:background-color (style/color :white)
:font-size "17px"}}
(for [ab (filter (fn [ab] (= "Address Book" (:type ab))) @abs-)]
^{:key (:id ab)} [imported-ab-row ab])
[link-row {:name "Import CSV or vCard"
:icon-style (sprites/misc-icons :dashboard-import)
:on-click #(println "CLICKED IMPORT CSV")}]
[link-row {:name "Import from LinkedIn"
:icon-style ((:linkedin sprites/ab-icons))
:on-click #(println "CLICKED IMPORT LINKEDIN")}]
[link-row {:name "Import from Yahoo"
:icon-style ((:linkedin sprites/ab-icons)) ;TODO: change to actual asset once we have a yahoo icon
:on-click #(println "CLICKED IMPORT YAHOO")}]]])))
(defn abs-body []
(rf/dispatch [:abs/load-abs])
(fn []
[:div {:style {:padding "33px 0" ;main page container
:margin-right "30px"
:min-width "500px"}}
[:span {:style {:font-weight style/font-regular-weight ;"My Account" header
:font-size "32px"
:color (style/color :grey :shade-1)}}
"Address Books"]
[email-accounts-panel]
[import-panel]
[social-networks-panel]]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment