()
| 120 | * accepts any ThemeSetting (including 'auto'). |
| 121 | */ |
| 122 | export function useTheme() { |
| 123 | const $ = _c(3); |
| 124 | const { |
| 125 | currentTheme, |
| 126 | setThemeSetting |
| 127 | } = useContext(ThemeContext); |
| 128 | let t0; |
| 129 | if ($[0] !== currentTheme || $[1] !== setThemeSetting) { |
| 130 | t0 = [currentTheme, setThemeSetting]; |
| 131 | $[0] = currentTheme; |
| 132 | $[1] = setThemeSetting; |
| 133 | $[2] = t0; |
| 134 | } else { |
| 135 | t0 = $[2]; |
| 136 | } |
| 137 | return t0; |
| 138 | } |
| 139 | |
| 140 | /** |
| 141 | * Returns the raw theme setting as stored in config. Use this in UI that |
no outgoing calls
no test coverage detected