create folder and device list components
refactor status-list to contain device and folder list
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<mat-button-toggle-group name="fontStyle" aria-label="Font Style">
|
||||
<mat-button-toggle value="folders">Folders</mat-button-toggle>
|
||||
<mat-button-toggle value="devices">Devices</mat-button-toggle>
|
||||
<mat-button-toggle value="folders" (click)="onSelect(toggleAction.Folders)">Folders</mat-button-toggle>
|
||||
<mat-button-toggle value=" devices" (click)="onSelect(toggleAction.Devices)">Devices</mat-button-toggle>
|
||||
</mat-button-toggle-group>
|
||||
@@ -1,15 +1,33 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
export enum ToggleAction {
|
||||
Folders = 1,
|
||||
Devices,
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: 'app-status-toggle',
|
||||
templateUrl: './status-toggle.component.html',
|
||||
styleUrls: ['./status-toggle.component.scss']
|
||||
})
|
||||
export class StatusToggleComponent implements OnInit {
|
||||
|
||||
export class StatusToggleComponent implements OnInit {
|
||||
public toggleAction = ToggleAction
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
onSelect(label: ToggleAction): void {
|
||||
|
||||
console.log("here?");
|
||||
switch (label) {
|
||||
case ToggleAction.Folders:
|
||||
console.log("folder action");
|
||||
break;
|
||||
case ToggleAction.Devices:
|
||||
console.log("Device action");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user