알림팝업 전체닫기 오류 수정

This commit is contained in:
Macbook
2026-05-23 21:25:46 +09:00
parent 70ac67afe7
commit 4df8279a31
11 changed files with 290 additions and 170 deletions
+11
View File
@@ -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}`);
}