mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-18 00:10:14 +01:00
Implement ripple effect for material themes
This commit is contained in:
parent
345c8836ca
commit
ed0f1670f8
12 changed files with 65 additions and 10 deletions
|
|
@ -5,6 +5,7 @@ import { UserData } from '../../../@core/data/users';
|
|||
import { LayoutService } from '../../../@core/utils';
|
||||
import { map, takeUntil } from 'rxjs/operators';
|
||||
import { Subject } from 'rxjs';
|
||||
import { RippleService } from '../../../@core/utils/ripple.service';
|
||||
|
||||
@Component({
|
||||
selector: 'ngx-header',
|
||||
|
|
@ -53,7 +54,8 @@ export class HeaderComponent implements OnInit, OnDestroy {
|
|||
private themeService: NbThemeService,
|
||||
private userService: UserData,
|
||||
private layoutService: LayoutService,
|
||||
private breakpointService: NbMediaBreakpointsService) {
|
||||
private breakpointService: NbMediaBreakpointsService,
|
||||
private rippleService: RippleService) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
|
@ -76,7 +78,10 @@ export class HeaderComponent implements OnInit, OnDestroy {
|
|||
map(({ name }) => name),
|
||||
takeUntil(this.destroy$),
|
||||
)
|
||||
.subscribe(themeName => this.currentTheme = themeName);
|
||||
.subscribe(themeName => {
|
||||
this.currentTheme = themeName;
|
||||
this.rippleService.toggle(themeName?.startsWith('material'));
|
||||
});
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue