How to use the @instructure/ui-themes/lib/canvas/high-contrast.use function in @instructure/ui-themes

To help you get started, we’ve selected a few @instructure/ui-themes 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 instructure / common-cartridge-viewer / src / index.js View on Github external
export const i18n = setupI18n({});

const rawLocale = parsedQueryString["locale"];
const locale = AVAILABLE_LOCALES[rawLocale] ? rawLocale : "en";
i18n.activate(locale);
AVAILABLE_LOCALES[locale]().then(messages => {
  const catalogs = {};
  catalogs[locale] = messages;
  i18n.load(catalogs);
});

const highContrastEnabled =
  typeof parsedQueryString["high-contrast"] !== "undefined";

if (highContrastEnabled) {
  highContrastTheme.use();
  import("./high-contrast.css");
} else {
  theme.use();
}

ReactDOM.render(
  
    
  ,
  document.getElementById("root")
);

@instructure/ui-themes

A library of instructure themes

MIT
Latest version published 3 days ago

Package Health Score

87 / 100
Full package analysis

Similar packages