Add menu background
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import { Component, OnInit,Input } from '@angular/core';
|
||||
import { Store, Action } from '@ngrx/store';
|
||||
import * as appReducers from '../../reducers/app-common.reducer';
|
||||
import * as commonActions from '../../actions/app-common.actions';
|
||||
|
||||
@Component({
|
||||
selector: 'fm-menu-background',
|
||||
templateUrl: './menu-background.component.html',
|
||||
styleUrls: ['./menu-background.component.scss'],
|
||||
})
|
||||
export class MenuBackgroundComponent implements OnInit {
|
||||
@Input() visible:boolean = false;
|
||||
constructor(private store: Store<appReducers.State>) { }
|
||||
|
||||
ngOnInit() { }
|
||||
|
||||
handleOnClick(event:MouseEvent) {
|
||||
if(this.visible) {
|
||||
this.store.dispatch(new commonActions.SetMenuVisible(false));
|
||||
event.stopPropagation();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user