   (:require-macros [western-music.util :refer [for']]))
 
 (def ^:const icons "material-icons")
+
+(defn icon
+  ([on-click type] (icon {} on-click type))
+  ([options on-click type]
+   (let [class (if (:class options)
+                 (str icons " " (:class options))
+                 icons)]
+     [:i (assoc options
+                :on-click on-click
+                :class class)
+      type])))
 
 (defn composition-list
   []

  (let [paused? (subscribe [:paused?])]
    (fn []
      [:div
       [:i {:on-click #(dispatch [:player-back]) :class icons} "skip_previous"]
       (if @paused?
         [:i {:on-click #(dispatch [:player-play]) :class icons} "play_arrow"]
         [:i {:on-click #(dispatch [:player-pause]) :class icons} "pause"])
       [:i {:on-click #(dispatch [:player-forward]) :class icons} "skip_next"]])))

(defn track-tabs []
  (let [q (subscribe [:track-queue])]

                :on-click (if (empty? @queue)
                            #(dispatch [:play-track id])
                            #(dispatch [:enqueue-track id]))}
          (icon #(dispatch [:play-track id]) "play_arrow")
          (icon #(dispatch [:enqueue-track id]) "queue_music")
          (p/display track)])])))

(defn composer-list
