MCPcopy Create free account
hub / github.com/microsoft/SandDance / getViewerOptions

Function getViewerOptions

packages/sanddance-app/src/sanddanceApp.tsx:49–58  ·  view source on GitHub ↗
(darkTheme: boolean, themeColors: { [theme: string]: ColorSettings })

Source from the content-addressed store, hash-verified

47}
48
49function getViewerOptions(darkTheme: boolean, themeColors: { [theme: string]: ColorSettings }) {
50 const colors = themeColors && themeColors[darkTheme ? 'dark' : 'light'];
51 const viewerOptions: Partial<ViewerOptions> = {
52 colors: {
53 ...getColorSettingsFromThemePalette(themePalettes[darkTheme ? 'dark-theme' : '']),
54 ...colors,
55 },
56 };
57 return viewerOptions;
58}
59
60function getSnapshotFromHash() {
61 const hash = document.location.hash && document.location.hash.substring(1);

Callers 2

constructorMethod · 0.70
changeColorSchemeMethod · 0.70

Calls 1

Tested by

no test coverage detected