enrecipes/app/components/modal/ConfirmDialog.vue
2020-10-30 01:42:53 +05:30

36 lines
926 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" />
<StackLayout
orientation="horizontal"
class="actionsContainer"
horizontalAlignment="right"
>
<Label
class="action orkm"
:text="cancelButtonText"
@tap="$modal.close(false)"
/>
<Label
class="action orkm"
:text="okButtonText"
@tap="$modal.close(true)"
/>
</StackLayout>
</StackLayout>
</Page>
</template>
<script>
import { Application } from "@nativescript/core"
export default {
props: ["title", "description", "cancelButtonText", "okButtonText"],
computed: {
isLightMode() {
return Application.systemAppearance()
},
},
}
</script>