Skip to content

Instantly share code, notes, and snippets.

@selfsame
Created February 14, 2015 18:26
Show Gist options
  • Select an option

  • Save selfsame/19a40c11adce5b5b04b4 to your computer and use it in GitHub Desktop.

Select an option

Save selfsame/19a40c11adce5b5b04b4 to your computer and use it in GitHub Desktop.
(html
(<div>
(class (? mousedown "noselect"))
(render-count :bg "pink")
(om/build style-options data {})
(<div.tabs>
(mapf [k]
(<div.label>
(class (when= tab k "active"))
(style {:width tabwidth})
(<p> (format-keyword k)
(onClick (fn [e] (state! :tab k)))))
tabkeys))
(<div.rules>
(mapf [rule]
(om/build widget rule {:init-state {:tab tab} :react-key (:name rule)})
(filter #(tabgroup (:name %)) css-rules)))))
@selfsame
Copy link
Author

     (el/div {:class (if mousedown "noselect" "")}    
      (render-count :bg "pink")
      (om/build style-options data {})
      (el/div {:class "tabs"}
       (mapf [k]
        (el/div
          {:class (class-str :label (when= tab k :active))
           :style {:width tabwidth}}
          (el/p
            {:onClick (fn [e] (state! :tab k))}
            (format-keyword k)))
        tabkeys))

      (el/div {:class "rules"}
       (mapf [rule]
        (om/build widget rule {:init-state {:tab tab} :react-key (:name rule)})
        (filter #(tabgroup (:name %)) css-rules)))))))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment