more conversion

This commit is contained in:
Keviin Åberg Kultalahti 2021-04-26 14:48:23 +02:00
parent 2ea62f14ab
commit f7cacbc8ae
1 changed files with 4 additions and 18 deletions

View File

@ -1,15 +1,12 @@
<script>
import { goto } from "@roxi/routify"
import { store, allScreens } from "builderStore"
import { notifications } from "@budibase/bbui"
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
import { ActionMenu, MenuItem, Icon } from "@budibase/bbui"
import { ActionMenu, MenuItem, Icon, notifications } from "@budibase/bbui"
export let screenId
let confirmDeleteDialog
let dropdown
let anchor
$: screen = $allScreens.find((screen) => screen._id === screenId)
@ -24,18 +21,13 @@
notifications.error("Error deleting screen")
}
}
const openModal = () => {
confirmDeleteDialog.show()
dropdown.hide()
}
</script>
<ActionMenu bind:this={dropdown}>
<div slot="button" class="icon" on:click={dropdown.show}>
<ActionMenu let:open let:closeOnClick>
<div slot="button" class="icon" on:click={open}>
<Icon s hoverable name="MoreSmallList" />
</div>
<MenuItem icon="Delete" on:click={openModal}>Delete</MenuItem>
<MenuItem icon="Delete" on:click={closeOnClick(confirmDeleteDialog.show)}>Delete</MenuItem>
</ActionMenu>
<ConfirmDialog
@ -45,9 +37,3 @@
okText="Delete Screen"
onOk={deleteScreen}
/>
<style>
.icon i {
font-size: 16px;
}
</style>