Created
August 22, 2015 00:33
-
-
Save currentoor/85dc03f7690df9ec0d9b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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