enrecipes/app/components/modals/Confirm.vue

56 lines
1.2 KiB
Vue
Raw Normal View History

2020-10-21 23:24:45 +05:30
<template>
2021-06-19 00:07:01 +05:30
<Page @loaded="mLoad" backgroundColor="transparent" :class="theme">
2021-04-01 16:25:35 +05:30
<GridLayout rows="auto, auto, auto" class="modal">
2021-06-15 16:34:42 +05:30
<RLabel class="title" :text="title | L" />
2021-02-28 20:40:26 +05:30
<Label
2021-04-01 16:25:35 +05:30
row="1"
2021-02-28 20:40:26 +05:30
v-if="description"
2021-06-19 00:07:01 +05:30
class="desc input tw lh4"
2021-02-28 20:40:26 +05:30
:text="description"
/>
2021-06-15 16:34:42 +05:30
<RGridLayout :rtl="RTL" row="2" columns="*, auto, auto" class="actions">
2021-04-01 16:25:35 +05:30
<Button
2021-02-28 20:40:26 +05:30
v-if="cancelButtonText"
2021-04-14 14:57:40 +05:30
col="1"
2021-06-18 18:22:03 +05:30
class="text tb st fb"
2021-04-01 16:25:35 +05:30
:text="cancelButtonText | L"
2021-06-15 16:34:42 +05:30
@tap="$modal.close(0)"
2021-02-28 20:40:26 +05:30
/>
2021-04-01 16:25:35 +05:30
<Button
2021-04-14 14:57:40 +05:30
col="2"
2021-06-18 18:22:03 +05:30
class="text tb st fb"
2021-04-01 16:25:35 +05:30
:text="okButtonText | L"
2021-06-15 16:34:42 +05:30
@tap="$modal.close(1)"
2021-02-28 20:40:26 +05:30
/>
2021-06-15 16:34:42 +05:30
</RGridLayout>
2021-04-01 16:25:35 +05:30
</GridLayout>
2021-02-28 20:40:26 +05:30
</Page>
2020-10-21 23:24:45 +05:30
</template>
2021-04-14 19:08:22 +05:30
<script lang="ts">
2021-02-28 20:40:26 +05:30
import { mapState } from "vuex";
2020-10-21 23:24:45 +05:30
export default {
2021-04-14 19:08:22 +05:30
props: {
title: {
type: String,
required: true,
},
description: {
type: String,
required: true,
},
cancelButtonText: {
type: String,
2021-04-18 18:58:25 +05:30
required: false,
2021-04-14 19:08:22 +05:30
},
okButtonText: {
type: String,
required: true,
},
},
computed: {
2021-06-15 16:34:42 +05:30
...mapState(["icon", "theme", "RTL"]),
2020-10-23 00:06:50 +05:30
},
2021-02-28 20:40:26 +05:30
};
2020-10-21 23:24:45 +05:30
</script>