enrecipes/app/components/modal/ConfirmDialog.vue

44 lines
985 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" />
2020-11-02 11:36:53 +00:00
<Label
v-if="description"
class="dialogDescription"
:text="description"
textWrap="true"
/>
<GridLayout
rows="auto"
columns="*, auto, 32, auto"
2020-10-21 17:54:45 +00:00
class="actionsContainer"
>
<Label
2020-11-02 11:36:53 +00:00
col="1"
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-11-02 11:36:53 +00:00
col="3"
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)"
/>
2020-11-02 11:36:53 +00:00
</GridLayout>
2020-10-21 17:54:45 +00:00
</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>