syncthing/next-gen-gui/src/app/list-toggle/list-toggle.component.ts

26 lines
694 B
TypeScript
Raw Normal View History

import { Component, EventEmitter, OnInit, Output, ViewChild } from '@angular/core';
import { StType } from '../type';
import { MatButtonToggleGroup } from '@angular/material/button-toggle';
2020-03-19 23:05:04 +01:00
@Component({
selector: 'app-list-toggle',
templateUrl: './list-toggle.component.html',
styleUrls: ['./list-toggle.component.scss']
})
export class ListToggleComponent implements OnInit {
@ViewChild(MatButtonToggleGroup) group: MatButtonToggleGroup;
public listType = StType;
// public toggleValue: string = "folders";
@Output() listTypeEvent = new EventEmitter<StType>();
2020-03-19 23:05:04 +01:00
constructor() { }
ngOnInit(): void {
}
onSelect(t: StType): void {
2020-03-19 23:05:04 +01:00
this.listTypeEvent.emit(t);
}
}