front end version 2 de framadate, un gestionnaire de sondage
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

25 lines
696 B

import { Component, OnInit } from '@angular/core';
import { Observable } from 'rxjs';
import { Theme } from '../../../enums/theme.enum';
import { ThemeService } from '../../../services/theme.service';
@Component({
selector: 'app-theme-selector',
templateUrl: './theme-selector.component.html',
styleUrls: ['./theme-selector.component.scss'],
})
export class ThemeSelectorComponent implements OnInit {
public themeEnum = Theme;
public currentTheme: Observable<Theme>;
constructor(private themeService: ThemeService) {}
ngOnInit(): void {
this.currentTheme = this.themeService.theme;
}
public selectTheme(theme: string): void {
this.themeService.selectTheme(theme as Theme);
}
}