Add disable close option to base overlay component
This commit is contained in:
parent
d3b5d05762
commit
a19b3c899f
|
@ -8,6 +8,7 @@
|
||||||
<BaseOverlay
|
<BaseOverlay
|
||||||
v-show="status !== 'welcome'"
|
v-show="status !== 'welcome'"
|
||||||
@close="status = 'welcome'"
|
@close="status = 'welcome'"
|
||||||
|
:disableClose="status === 'select_timeline'"
|
||||||
:title="status === 'login'
|
:title="status === 'login'
|
||||||
? loginButton
|
? loginButton
|
||||||
: status === 'public_timeline'
|
: status === 'public_timeline'
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<transition name="fade">
|
<transition name="fade">
|
||||||
<div class="overlay">
|
<div class="overlay">
|
||||||
<button type="button" class="close-button" @click="closeOverlay">X</button>
|
<button type="button" class="close-button" @click="closeOverlay" v-show="!disableClose">X</button>
|
||||||
<h1>{{ title }}</h1>
|
<h1>{{ title }}</h1>
|
||||||
<div class="overlay-inner">
|
<div class="overlay-inner">
|
||||||
<slot/>
|
<slot/>
|
||||||
|
@ -19,6 +19,8 @@ import { Component, Prop, Vue } from 'vue-property-decorator'
|
||||||
export default class BaseOverlay extends Vue {
|
export default class BaseOverlay extends Vue {
|
||||||
@Prop()
|
@Prop()
|
||||||
public title?: string
|
public title?: string
|
||||||
|
@Prop()
|
||||||
|
public disableClose?: boolean
|
||||||
|
|
||||||
public closeOverlay() {
|
public closeOverlay() {
|
||||||
this.$emit('close')
|
this.$emit('close')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user