Skip to content

Commit b1afeac

Browse files
committed
refactor(calendar): update days-view logic
1 parent 19abcd9 commit b1afeac

File tree

1 file changed

+9
-15
lines changed

1 file changed

+9
-15
lines changed

projects/igniteui-angular/src/lib/calendar/days-view/days-view.component.ts

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ import {
1212
booleanAttribute,
1313
ElementRef,
1414
ChangeDetectorRef,
15-
ChangeDetectionStrategy, inject, DestroyRef, AfterContentChecked,
15+
ChangeDetectionStrategy,
16+
inject,
17+
DestroyRef,
18+
AfterContentChecked
1619
} from '@angular/core';
1720
import { NG_VALUE_ACCESSOR } from '@angular/forms';
1821
import { TitleCasePipe } from '@angular/common';
@@ -206,34 +209,25 @@ export class IgxDaysViewComponent extends IgxCalendarBaseDirective implements Af
206209

207210
// Theme-specific classes
208211
@HostBinding('class.igx-days-view--material')
209-
public get isMaterial(): boolean {
212+
protected get isMaterial(): boolean {
210213
return this._theme === 'material';
211214
}
212215

213216
@HostBinding('class.igx-days-view--fluent')
214-
public get isFluent(): boolean {
217+
protected get isFluent(): boolean {
215218
return this._theme === 'fluent';
216219
}
217220

218221
@HostBinding('class.igx-days-view--bootstrap')
219-
public get isBootstrap(): boolean {
222+
protected get isBootstrap(): boolean {
220223
return this._theme === 'bootstrap';
221224
}
222225

223226
@HostBinding('class.igx-days-view--indigo')
224-
public get isIndigo(): boolean {
227+
protected get isIndigo(): boolean {
225228
return this._theme === 'indigo';
226229
}
227230

228-
@Input()
229-
public set theme(value: IgxTheme) {
230-
this._theme = value;
231-
}
232-
233-
public get theme(): IgxTheme {
234-
return this._theme;
235-
}
236-
237231
/**
238232
* @hidden
239233
*/
@@ -265,7 +259,7 @@ export class IgxDaysViewComponent extends IgxCalendarBaseDirective implements Af
265259
const theme = getComponentTheme(this.el.nativeElement);
266260

267261
if (theme && theme !== this._theme) {
268-
this.theme = theme;
262+
this._theme = theme;
269263
this.cdr.markForCheck();
270264
}
271265
}

0 commit comments

Comments
 (0)