2020-02-19 05:51:28 +13:00
|
|
|
<script>
|
2020-10-08 21:35:11 +13:00
|
|
|
import { Modal, ModalContent } from "@budibase/bbui"
|
2020-02-25 04:00:48 +13:00
|
|
|
|
|
|
|
export let title = ""
|
2020-10-03 09:06:06 +13:00
|
|
|
export let body = ""
|
|
|
|
export let okText = "Confirm"
|
|
|
|
export let cancelText = "Cancel"
|
2020-10-08 21:35:11 +13:00
|
|
|
export let onOk = undefined
|
|
|
|
export let onCancel = undefined
|
2020-10-03 00:00:17 +13:00
|
|
|
|
2020-10-08 21:35:11 +13:00
|
|
|
let modal
|
2020-02-25 04:00:48 +13:00
|
|
|
|
|
|
|
export const show = () => {
|
2020-10-08 21:35:11 +13:00
|
|
|
modal.show()
|
2020-02-25 04:00:48 +13:00
|
|
|
}
|
|
|
|
export const hide = () => {
|
2020-10-08 21:35:11 +13:00
|
|
|
modal.hide()
|
2020-02-25 04:00:48 +13:00
|
|
|
}
|
2020-02-19 05:51:28 +13:00
|
|
|
</script>
|
|
|
|
|
2020-10-08 21:35:11 +13:00
|
|
|
<Modal bind:this={modal} on:hide={onCancel}>
|
|
|
|
<ModalContent onConfirm={onOk} {title} confirmText={okText} {cancelText} red>
|
|
|
|
<div class="body">{body}</div>
|
|
|
|
</ModalContent>
|
2020-09-03 19:44:08 +12:00
|
|
|
</Modal>
|
2020-03-24 23:56:48 +13:00
|
|
|
|
|
|
|
<style>
|
2020-10-03 00:00:17 +13:00
|
|
|
.body {
|
2020-09-25 22:30:26 +12:00
|
|
|
font-size: var(--font-size-s);
|
|
|
|
}
|
2020-03-24 23:56:48 +13:00
|
|
|
</style>
|