UNPKG

@livelike/react-native

Version:

LiveLike React Native package

89 lines (88 loc) 2.36 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.themeStoreActions = exports.themeStore = exports.DEFAULT_THEMES = void 0; var _types = require("../types"); var _store = require("./store"); let DEFAULT_THEMES = exports.DEFAULT_THEMES = { [_types.LLThemeType.LIGHT]: { text: '#131617', secondaryText: '#7A7B7C', background: '#F1F1F1', secondaryBackground: '#FFFFFF', popoverBackground: '#EDEDED', primaryButtonBackground: '#27BF9D', primaryPressedButtonBackground: '#007878', primaryButtonText: '#131617', border: '#DADADA', info: '#27BF9D', error: '#BF2727', widgetBackground: '#F4F5F6', widgetOption: '#DDE2E3', widgetSelectedOption: '#BCC5C8', disabledButtonBackground: '#A5B1B6', disabledButtonText: '#FFFFFF', correct: '#3DCF25', incorrect: '#A00D32', correctIncorrectText: '#FFFFFF' }, [_types.LLThemeType.DARK]: { text: '#FFFFFF', secondaryText: '#7A7B7C', background: '#131617', secondaryBackground: '#1B1E1F', popoverBackground: '#2B3136', primaryButtonBackground: '#27BF9D', primaryPressedButtonBackground: '#007878', primaryButtonText: '#131524', border: '#474E55', info: '#27BF9D', error: '#BF2727', widgetBackground: '#131524', widgetOption: '#202233', widgetSelectedOption: '#383D57', disabledButtonBackground: '#363847', disabledButtonText: '#FFFFFF', correct: '#3DCF25', incorrect: '#A00D32', correctIncorrectText: '#FFFFFF' } }; const themeStore = exports.themeStore = (0, _store.createStore)({ currentThemeType: _types.LLThemeType.DARK, themes: DEFAULT_THEMES, isNonDefaultThemeType: false, fonts: {} }); const themeStoreActions = exports.themeStoreActions = { setThemeTypeAction(newThemeType) { themeStore.set({ ...themeStore.get(), currentThemeType: newThemeType, isNonDefaultThemeType: true }); }, setThemesAction(_themes) { themeStore.set({ ...themeStore.get(), themes: { ...themeStore.get().themes, ..._themes } }); }, setFontsAction(_ref) { let { fonts } = _ref; themeStore.set({ ...themeStore.get(), fonts: { ...themeStore.get().fonts, ...fonts } }); } }; //# sourceMappingURL=theme.js.map