mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-17 07:50:12 +01:00
Add material themes to themes carousel
This commit is contained in:
parent
8f5eaec1e4
commit
9aa4b9c53f
6 changed files with 50 additions and 26 deletions
|
|
@ -22,8 +22,10 @@ export class ThemeSectionComponent implements OnDestroy {
|
|||
|
||||
private alive = true;
|
||||
private themes: string[] = [
|
||||
'Light',
|
||||
'Dark',
|
||||
'Material\nLight',
|
||||
'Material\nDark',
|
||||
'Eva\nLight',
|
||||
'Eva\nDark',
|
||||
'Cosmic',
|
||||
'Corporate',
|
||||
];
|
||||
|
|
@ -32,6 +34,7 @@ export class ThemeSectionComponent implements OnDestroy {
|
|||
breakpoints: any;
|
||||
sliderIndex: number = 1;
|
||||
initialSwiperConfig: SwiperConfigInterface = {
|
||||
initialSlide: 1,
|
||||
direction: 'horizontal',
|
||||
spaceBetween: 200,
|
||||
slidesPerView: 'auto',
|
||||
|
|
@ -55,9 +58,7 @@ export class ThemeSectionComponent implements OnDestroy {
|
|||
renderBullet: (index, className) => {
|
||||
return `
|
||||
<span class="${className}">
|
||||
<span>
|
||||
${this.themes[index]}
|
||||
</span>
|
||||
<span>${this.themes[index]}</span>
|
||||
</span>`;
|
||||
},
|
||||
},
|
||||
|
|
@ -66,8 +67,10 @@ export class ThemeSectionComponent implements OnDestroy {
|
|||
...this.initialSwiperConfig,
|
||||
};
|
||||
|
||||
constructor(private themeService: NbThemeService,
|
||||
private breakpointService: NbMediaBreakpointsService) {
|
||||
constructor(
|
||||
private themeService: NbThemeService,
|
||||
private breakpointService: NbMediaBreakpointsService,
|
||||
) {
|
||||
this.breakpoints = this.breakpointService.getBreakpointsMap();
|
||||
this.themeService.onMediaQueryChange()
|
||||
.pipe(takeWhile(() => this.alive))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue