22 lines
540 B
TypeScript
22 lines
540 B
TypeScript
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
|
import { config } from '../config';
|
|
|
|
@Component({
|
|
selector: 'app-sidebar',
|
|
templateUrl: './sidebar.component.html',
|
|
styleUrls: ['./sidebar.component.scss']
|
|
})
|
|
|
|
export class SidebarComponent {
|
|
@Input() layout: string;
|
|
@Output() layoutChanged = new EventEmitter<string>();
|
|
enabledLayouts: string[] = config.dashboard.enabledLayouts;
|
|
|
|
constructor() {}
|
|
|
|
setLayout(layout: string) {
|
|
this.layout = layout;
|
|
this.layoutChanged.emit(this.layout);
|
|
}
|
|
}
|