enrecipes/app/components/modals/Confirm.vue

56 lines
1.2 KiB
Vue
Raw Normal View History

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