(darkTheme: boolean, themeColors: { [theme: string]: ColorSettings })
| 47 | } |
| 48 | |
| 49 | function 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 | |
| 60 | function getSnapshotFromHash() { |
| 61 | const hash = document.location.hash && document.location.hash.substring(1); |
no test coverage detected