enrecipes/app/components/modal/ConfirmDialog.vue
2020-11-02 17:06:53 +05:30

43 lines
985 B
Vue

<template>
<Page>
<StackLayout class="dialogContainer" :class="isLightMode">
<Label class="dialogTitle orkm" :text="title" />
<Label
v-if="description"
class="dialogDescription"
:text="description"
textWrap="true"
/>
<GridLayout
rows="auto"
columns="*, auto, 32, auto"
class="actionsContainer"
>
<Label
col="1"
class="action orkm"
:text="cancelButtonText"
@tap="$modal.close(false)"
/>
<Label
col="3"
class="action orkm"
:text="okButtonText"
@tap="$modal.close(true)"
/>
</GridLayout>
</StackLayout>
</Page>
</template>
<script>
import { Application } from "@nativescript/core"
export default {
props: ["title", "description", "cancelButtonText", "okButtonText"],
computed: {
isLightMode() {
return Application.systemAppearance()
},
},
}
</script>