1
0
Fork 0
mirror of synced 2024-09-18 10:20:11 +12:00
budibase/packages/builder/src/components/common/ConfirmDialog.svelte

38 lines
617 B
Svelte
Raw Normal View History

2020-02-19 05:51:28 +13:00
<script>
import { Modal } from "components/common/Modal"
2020-02-25 04:00:48 +13:00
export let title = ""
export let body = ""
export let okText = "Confirm"
export let cancelText = "Cancel"
export let onOk = () => {}
export let onCancel = () => {}
let visible = false
2020-02-25 04:00:48 +13:00
export const show = () => {
visible = true
2020-02-25 04:00:48 +13:00
}
export const hide = () => {
visible = false
2020-02-25 04:00:48 +13:00
}
2020-02-19 05:51:28 +13:00
</script>
<Modal
id={title}
bind:visible
on:hide={onCancel}
{title}
confirmText={okText}
{cancelText}
onConfirm={onOk}
red>
<div class="body">{body}</div>
</Modal>
2020-03-24 23:56:48 +13:00
<style>
.body {
font-size: var(--font-size-s);
}
2020-03-24 23:56:48 +13:00
</style>