Skip to content

Instantly share code, notes, and snippets.

@currentoor
Created August 22, 2015 00:33
Show Gist options
  • Save currentoor/85dc03f7690df9ec0d9b to your computer and use it in GitHub Desktop.
Save currentoor/85dc03f7690df9ec0d9b to your computer and use it in GitHub Desktop.
(def app-wrapper
(let [colors js/window.MaterialUI.Styles.Colors
yaad-theme #js {:getPalette (fn [] #js {:primary1Color (.-green800 colors)
:primary2Color (.-green700 colors)
:primary3Color (.-green600 colors)})
:getComponentThemes (fn [_] #js {})}
theme-manager (js/window.MaterialUI.Styles.ThemeManager.)]
(js/React.createClass
#js {:childContextTypes #js {:muiTheme js/React.PropTypes.object}
:getChildContext (fn []
(js/console.log ((.-getCurrentTheme theme-manager)))
#js {:muiTheme theme-manager;
})
:componentWillMount (fn []
;(js/console.log theme)
(.setTheme theme-manager yaad-theme)
)
:displayName "app-wrapper"
:render (fn []
(app conn))})))
(defn app-wrapper-ctor []
(rum/element app-wrapper {}))
(defn mount-components []
(rum/mount (app-wrapper-ctor) (. js/document (getElementById "app"))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment