File

src/app/@theme/components/theme-switcher/theme-switcher.component.ts

Metadata

selector ngx-theme-switcher
styleUrls theme-switcher.component.scss
templateUrl ./theme-switcher.component.html

Index

Properties
Inputs

Inputs

showTitle

Type: boolean

Default value: true

Properties

popover
popover: NbPopoverDirective
Type : NbPopoverDirective
Decorators : ViewChild
switcherListComponent
switcherListComponent:
Default value : ThemeSwitcherListComponent
theme
theme: NbJSThemeOptions
Type : NbJSThemeOptions
import { Component, Input, ViewChild } from '@angular/core';
import { NbPopoverDirective } from '@nebular/theme';
import { NbJSThemeOptions } from '@nebular/theme/services/js-themes/theme.options';

import { ThemeSwitcherListComponent } from './themes-switcher-list/themes-switcher-list.component';

@Component({
  selector: 'ngx-theme-switcher',
  templateUrl: './theme-switcher.component.html',
  styleUrls: ['./theme-switcher.component.scss'],
})
export class ThemeSwitcherComponent {
  @ViewChild(NbPopoverDirective) popover: NbPopoverDirective;

  @Input() showTitle: boolean = true;

  switcherListComponent = ThemeSwitcherListComponent;
  theme: NbJSThemeOptions;
}
<div class="themes-switcher"
     [nbPopover]="switcherListComponent"
     nbPopoverPlacement="bottom"
     [nbPopoverContext]="{popover: popover}">
  <i class="nb-drops"></i>
  <span *ngIf="showTitle">Themes</span>
</div>
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""