UNPKG

acklen-keystone

Version:

Web Application Framework and Admin GUI / Content Management System built on Express.js and Mongoose

24 lines (23 loc) 590 B
import { getCurrentTheme } from '../../containers/ThemeSwitcher/config'; const actions = { CHANGE_THEME: 'CHANGE_THEME', SWITCH_ACTIVATION: 'SWITCH_ACTIVATION', switchActivation: () => ({ type: actions.SWITCH_ACTIVATION, }), changeTheme: (attribute, themeName) => { const theme = getCurrentTheme(attribute, themeName); if (attribute === 'layoutTheme') { document.getElementsByClassName( 'isomorphicContent' )[0].style.backgroundColor = theme.backgroundColor; } return { type: actions.CHANGE_THEME, attribute, theme, }; }, }; export default actions;