enrecipes/app/components/modal/ConfirmDialog.vue

52 lines
1.2 KiB
Vue
Raw Normal View History

2020-10-21 17:54:45 +00:00
<template>
2021-04-12 18:09:48 +00:00
<Page @loaded="transparentPage" backgroundColor="transparent" :class="appTheme">
2021-04-01 10:55:35 +00:00
<GridLayout rows="auto, auto, auto" class="modal">
<Label 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-04-01 10:55:35 +00:00
class="description tw"
2021-02-28 15:10:26 +00:00
:text="description"
/>
2021-04-01 10:55:35 +00:00
<GridLayout row="2" columns="auto, *, auto, auto" class="actions">
<Button
v-if="secondButtonText"
col="0"
class="text sm"
:text="secondButtonText | L"
@tap="$modal.close(-1)"
/>
<Button
2021-02-28 15:10:26 +00:00
v-if="cancelButtonText"
2021-04-01 10:55:35 +00:00
col="2"
class="text sm"
:text="cancelButtonText | L"
2021-02-28 15:10:26 +00:00
@tap="$modal.close(false)"
/>
2021-04-01 10:55:35 +00:00
<Button
col="3"
class="text sm"
:text="okButtonText | L"
2021-02-28 15:10:26 +00:00
@tap="$modal.close(true)"
/>
</GridLayout>
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>
<script>
2021-02-28 15:10:26 +00:00
import { mapState } from "vuex";
2020-10-21 17:54:45 +00:00
export default {
2021-02-28 15:10:26 +00:00
props: [
"title",
"description",
2021-04-01 10:55:35 +00:00
"secondButtonText",
2021-02-28 15:10:26 +00:00
"cancelButtonText",
"okButtonText",
],
computed: {
2021-04-01 10:55:35 +00:00
...mapState(["icon", "appTheme"]),
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>