알림팝업 전체닫기 오류 수정
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import type { Theme } from '../types';
|
||||
|
||||
const HTML_THEME_CLASSES = ['theme-dark', 'theme-light', 'theme-blue'] as const;
|
||||
|
||||
/** body 포털(알림 팝업 등)에서도 테마 CSS 변수가 적용되도록 html 클래스 동기화 */
|
||||
export function syncDocumentTheme(theme: Theme): void {
|
||||
if (typeof document === 'undefined') return;
|
||||
const html = document.documentElement;
|
||||
html.classList.remove(...HTML_THEME_CLASSES);
|
||||
html.classList.add(`theme-${theme}`);
|
||||
}
|
||||
Reference in New Issue
Block a user