forked from trent_larson/crowd-funder-for-time-pwa
Make the visibility of the Alert indirect
This commit is contained in:
@@ -18,15 +18,15 @@ import { Component, Prop, Vue } from "vue-facing-decorator";
|
|||||||
export default class AlertMessage extends Vue {
|
export default class AlertMessage extends Vue {
|
||||||
@Prop alertTitle = "";
|
@Prop alertTitle = "";
|
||||||
@Prop alertMessage = "";
|
@Prop alertMessage = "";
|
||||||
|
isAlertVisible = this.alertMessage;
|
||||||
|
|
||||||
public onClickClose() {
|
public onClickClose() {
|
||||||
this.alertTitle = "";
|
this.isAlertVisible = false;
|
||||||
this.alertMessage = "";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public computedAlertClassNames() {
|
public computedAlertClassNames() {
|
||||||
return {
|
return {
|
||||||
hidden: !this.alertMessage,
|
hidden: !this.isAlertVisible,
|
||||||
"dismissable-alert": true,
|
"dismissable-alert": true,
|
||||||
"bg-slate-100": true,
|
"bg-slate-100": true,
|
||||||
"p-5": true,
|
"p-5": true,
|
||||||
|
|||||||
Reference in New Issue
Block a user