()
| 10 | |
| 11 | export const themeState = state('dark'); |
| 12 | export const useTheme = () => { |
| 13 | const theme = useSnapshot(themeState); |
| 14 | return { |
| 15 | isDark: theme === 'dark', |
| 16 | theme |
| 17 | }; |
| 18 | }; |
| 19 | themeState.subscribe(() => { |
| 20 | const theme = themeState.get(); |
| 21 | document.body.className = bem('szh-app', null, { theme }); |
no outgoing calls
no test coverage detected
searching dependent graphs…