Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const getColorModes = (theme: RemirrorTheme) => Object.keys(get('colors.modes', theme, {}));
export const getFactory = (theme: RemirrorTheme) => (
path: string | Array,
fallback?: any,
): GReturn => get(path, theme, fallback);
export const applyColorMode = (theme: RemirrorTheme, mode: string): RemirrorTheme => {
if (!mode) {
return theme;
}
const modes = get('colors.modes', theme, {});
return deepMerge(theme, { colors: get(mode, modes, {}) });
};