mancala/src/theme/ThemeManager.ts

19 lines
332 B
TypeScript
Raw Normal View History

2022-05-15 01:58:57 +03:00
import { Theme } from "./Theme";
export default class ThemeManager {
_theme: Theme;
onThemeChange: (theme: Theme) => void;
constructor(theme: Theme) {
this._theme = theme;
}
public get theme() {
return this._theme;
}
public set theme(value) {
this._theme = value;
this.onThemeChange?.(value);
}
}