Skip to content

Commit 08f549d

Browse files
authored
Merge pull request #3150 from IgniteUI/sstoychev/remove-dark-switch
removing the dark theme switch
2 parents 36ed9de + 9605dc8 commit 08f549d

7 files changed

Lines changed: 1 addition & 49 deletions

File tree

projects/app-lob/src/app/grid-finjs/controllers.component.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
<div class="controls-wrapper">
22
<div class="controls-holder">
33
<div class="switches">
4-
<div class="control-item">
5-
<igx-switch [checked]="false" [(ngModel)]="theme" (change)="onChange('theme', $event)">Dark</igx-switch>
6-
</div>
74
<div class="control-item">
85
<igx-switch [checked]="true" (change)="onChange('grouped', $event)" color="blue"
96
cssClass="finjs-sample-switch">

projects/app-lob/src/app/grid-finjs/controllers.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ export class ControllerComponent implements OnInit, OnDestroy {
2323
@Output() public playAction = new EventEmitter<{ action: string }>();
2424

2525
public volume = 1000;
26-
public theme = false;
2726
public frequency = 500;
2827
public controls = [
2928
{

projects/app-lob/src/app/grid-finjs/main.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="main__wrapper igx-scrollbar" [class.fin-dark-theme]="darkTheme">
1+
<div class="main__wrapper igx-scrollbar">
22
<app-finjs-controllers #controllers
33
(switchChanged)="onSwitchChanged($event)"
44
(volumeChanged)="onVolumeChanged($event)"

projects/app-lob/src/app/grid-finjs/main.component.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ export class FinJSDemoComponent implements OnDestroy, AfterViewInit {
2222
closeOnOutsideClick: true
2323
};
2424

25-
@HostBinding('class.dark-theme')
26-
public darkTheme = false;
27-
2825
public properties = ['price', 'country'];
2926
public chartData: Stock[] = [];
3027
public volume = 1000;
@@ -41,10 +38,6 @@ export class FinJSDemoComponent implements OnDestroy, AfterViewInit {
4138
this.finGrid.toggleGrouping();
4239
break;
4340
}
44-
case 'theme': {
45-
this.darkTheme = event.value;
46-
break;
47-
}
4841
default: break;
4942
}
5043
}

projects/app-lob/src/app/treegrid-finjs/tree-grid-finjs-sample.component.scss

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
11
@use '../../variables' as *;
22

33
:host ::ng-deep {
4-
.fin-dark-theme {
5-
.finjs-slider,
6-
.sample-toolbar,
7-
.group-drop-area {
8-
color: contrast-color(null, 'gray', 900);
9-
}
10-
11-
.group-drop-area {
12-
background: color(null, 'surface', 500);
13-
}
14-
}
15-
164
.finjs-icons {
175
display: flex;
186
align-items: center;

projects/app-lob/src/app/treegrid-finjs/tree-grid-finjs-sample.component.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ export class TreeGridFinJSComponent implements OnDestroy, OnInit {
2121
@ViewChild('slider2', { static: true }) public intervalSlider!: IgxSliderComponent;
2222
@ViewChild(IgxOverlayOutletDirective, { static: true }) public outlet!: IgxOverlayOutletDirective;
2323

24-
@HostBinding('class.dark-theme')
25-
public theme = false;
26-
2724
public showToolbar = true;
2825
public selectionMode = 'multiple';
2926
public volume = 1000;
@@ -162,19 +159,6 @@ export class TreeGridFinJSComponent implements OnDestroy, OnInit {
162159
return value ? '$' + value.toFixed(3) : '';
163160
}
164161

165-
/**
166-
* the below code is needed when accessing the sample through the navigation
167-
* it will style all the space below the sample component element, but not the navigation menu
168-
*/
169-
public onThemeChanged(event: any) {
170-
const parentEl = this.parentComponentEl();
171-
if (event.checked && parentEl.classList.contains('main')) {
172-
parentEl.classList.add('fin-dark-theme');
173-
} else {
174-
parentEl.classList.remove('fin-dark-theme');
175-
}
176-
}
177-
178162
public ngOnDestroy() {
179163
this.stopFeed();
180164
}

src/styles.scss

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,3 @@ body {
3636
@include fluent-dark-theme($fluent-excel-palette);
3737
}
3838
}
39-
40-
.fin-dark-theme {
41-
@include dark-theme($green-palette);
42-
background: #333;
43-
44-
::-moz-placeholder {
45-
opacity: 1;
46-
}
47-
}

0 commit comments

Comments
 (0)