How to use the @remirror/core-helpers.get function in @remirror/core-helpers

To help you get started, we’ve selected a few @remirror/core-helpers examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ifiokjr / remirror / @remirror / ui / src / ui-utils.ts View on Github external
export const getColorModes = (theme: RemirrorTheme) => Object.keys(get('colors.modes', theme, {}));
github ifiokjr / remirror / @remirror / ui / src / ui-utils.ts View on Github external
export const getFactory = (theme: RemirrorTheme) => (
  path: string | Array,
  fallback?: any,
): GReturn => get(path, theme, fallback);
github ifiokjr / remirror / @remirror / ui / src / ui-utils.ts View on Github external
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, {}) });
};