turkmentv_front/services/theme.service.ts

12 lines
349 B
TypeScript
Raw Permalink Normal View History

2024-08-19 12:44:56 +00:00
import { ITheme } from "@/typings/theme.type";
export class ThemeService {
static setLocalTheme(themeValue: ITheme["theme"]): ITheme["theme"] {
localStorage.setItem("localTheme", themeValue);
return themeValue;
}
static getLocalTheme(): ITheme["theme"] | null {
return localStorage.getItem("localTheme") as ITheme["theme"];
}
}