enrecipes/app/components/modal/ConfirmDialog.vue

37 lines
926 B
Vue
Raw Normal View History

2020-10-21 17:54:45 +00:00
<template>
<Page>
<StackLayout class="dialogContainer" :class="isLightMode">
2020-10-21 17:54:45 +00:00
<Label class="dialogTitle orkm" :text="title" />
<Label v-if="description" class="dialogDescription" :text="description" textWrap="true" />
2020-10-21 17:54:45 +00:00
<StackLayout
orientation="horizontal"
class="actionsContainer"
horizontalAlignment="right"
>
<Label
2020-10-22 18:36:50 +00:00
class="action orkm"
2020-10-21 17:54:45 +00:00
:text="cancelButtonText"
@tap="$modal.close(false)"
/>
<Label
2020-10-22 18:36:50 +00:00
class="action orkm"
2020-10-21 17:54:45 +00:00
:text="okButtonText"
@tap="$modal.close(true)"
/>
</StackLayout>
</StackLayout>
</Page>
</template>
<script>
import { Application } from "@nativescript/core"
2020-10-21 17:54:45 +00:00
export default {
props: ["title", "description", "cancelButtonText", "okButtonText"],
computed: {
isLightMode() {
return Application.systemAppearance()
},
2020-10-22 18:36:50 +00:00
},
2020-10-21 17:54:45 +00:00
}
</script>