# All files / app/utilities style-manager.ts

57.14% Statements 12/21
100% Branches 0/0
14.29% Functions 1/7
60% Lines 12/20

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    392x

    2x

    2x
    2x
    2x

    2x

    2x

    2x

    2x

    2x

    2x

    2x
     import { SheetsManager } from "jss";

    const manager: any = new SheetsManager();

    class Theme {
        private _background: string = "blue";
        private _width: string = "100%";

        private updateStylesheets(): void {
            manager.sheets.forEach((sheet: any) => {
                sheet.update(this);
            });
        }

        get background(): string {
            return this._background;
        }

        set background(value: string) {
            this._background = value;
            this.updateStylesheets();
        }

        get width(): string {
            return this._width;
        }

        set width(value: string) {
            this._width = value;
            this.updateStylesheets();
        }
    }

    const theme: any = new Theme();

    export default manager;

    export { theme };