2020-02-19 05:51:28 +13:00
|
|
|
<script>
|
2020-10-05 23:13:09 +13:00
|
|
|
import { Modal } from "components/common/Modal"
|
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"
|
|
|
|
export let onOk = () => {}
|
|
|
|
export let onCancel = () => {}
|
2020-10-03 00:00:17 +13:00
|
|
|
|
2020-10-05 23:13:09 +13:00
|
|
|
let visible = false
|
2020-02-25 04:00:48 +13:00
|
|
|
|
|
|
|
export const show = () => {
|
2020-10-05 23:13:09 +13:00
|
|
|
visible = true
|
2020-02-25 04:00:48 +13:00
|
|
|
}
|
|
|
|
export const hide = () => {
|
2020-10-05 23:13:09 +13:00
|
|
|
visible = false
|
2020-02-25 04:00:48 +13:00
|
|
|
}
|
2020-02-19 05:51:28 +13:00
|
|
|
</script>
|
|
|
|
|
2020-10-05 23:13:09 +13:00
|
|
|
<Modal
|
|
|
|
id={title}
|
|
|
|
bind:visible
|
|
|
|
on:hide={onCancel}
|
|
|
|
{title}
|
|
|
|
confirmText={okText}
|
|
|
|
{cancelText}
|
|
|
|
onConfirm={onOk}
|
|
|
|
red>
|
2020-10-03 00:00:17 +13:00
|
|
|
<div class="body">{body}</div>
|
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>
|