convert ScreenDropdown to use ActionMenu
This commit is contained in:
parent
426377513c
commit
1d614cf792
|
@ -3,7 +3,7 @@
|
||||||
import { store, allScreens } from "builderStore"
|
import { store, allScreens } from "builderStore"
|
||||||
import { notifications } from "@budibase/bbui"
|
import { notifications } from "@budibase/bbui"
|
||||||
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
||||||
import { Icon, Popover } from "@budibase/bbui"
|
import { ActionMenu, MenuItem, Icon, Popover } from "@budibase/bbui"
|
||||||
import { DropdownContainer, DropdownItem } from "components/common/Dropdowns"
|
import { DropdownContainer, DropdownItem } from "components/common/Dropdowns"
|
||||||
|
|
||||||
export let screenId
|
export let screenId
|
||||||
|
@ -25,22 +25,20 @@
|
||||||
notifications.error("Error deleting screen")
|
notifications.error("Error deleting screen")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const openModal = () => {
|
||||||
|
confirmDeleteDialog.show()
|
||||||
|
dropdown.hide()
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div bind:this={anchor} on:click|stopPropagation>
|
<ActionMenu bind:this={dropdown}>
|
||||||
<div class="icon" on:click={() => dropdown.show()}>
|
<div slot="button" class="icon" on:click={dropdown.show}>
|
||||||
<Icon s hoverable name="MoreSmallList" />
|
<Icon s hoverable name="MoreSmallList" />
|
||||||
</div>
|
</div>
|
||||||
<Popover bind:this={dropdown} {anchor} align="left">
|
<MenuItem icon="Delete" on:click={openModal}>Delete</MenuItem>
|
||||||
<DropdownContainer>
|
</ActionMenu>
|
||||||
<DropdownItem
|
|
||||||
icon="ri-delete-bin-line"
|
|
||||||
title="Delete"
|
|
||||||
on:click={() => confirmDeleteDialog.show()}
|
|
||||||
/>
|
|
||||||
</DropdownContainer>
|
|
||||||
</Popover>
|
|
||||||
</div>
|
|
||||||
<ConfirmDialog
|
<ConfirmDialog
|
||||||
bind:this={confirmDeleteDialog}
|
bind:this={confirmDeleteDialog}
|
||||||
title="Confirm Deletion"
|
title="Confirm Deletion"
|
||||||
|
|
Loading…
Reference in New Issue