More ActionMenu conversion
This commit is contained in:
parent
2b394eab25
commit
f63861771e
|
@ -32,11 +32,11 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<ActionMenu bind:this={dropdown}>
|
||||
<ActionMenu bind:this={dropdown} let:closeOnClick >
|
||||
<div slot="button" class="icon" on:click={dropdown.show}>
|
||||
<Icon s hoverable name="MoreSmallList" />
|
||||
</div>
|
||||
<MenuItem icon="Delete" on:click={showModal}>Delete</MenuItem>
|
||||
<MenuItem icon="Delete" on:click={closeOnClick(confirmDeleteDialog.show)}>Delete</MenuItem>
|
||||
</ActionMenu>
|
||||
|
||||
<ConfirmDialog
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
<script>
|
||||
import { notifications } from "@budibase/bbui"
|
||||
import { ActionMenu, MenuItem, Icon, Popover } from "@budibase/bbui"
|
||||
import { ActionMenu, MenuItem, Icon, Popover, notifications } from "@budibase/bbui"
|
||||
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
||||
import { DropdownContainer, DropdownItem } from "components/common/Dropdowns"
|
||||
import { queries } from "stores/backend"
|
||||
|
||||
export let query
|
||||
|
||||
|
@ -25,11 +24,11 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<ActionMenu bind:this={dropdown}>
|
||||
<ActionMenu bind:this={dropdown} let:closeOnClick>
|
||||
<div slot="button" class="icon" on:click={dropdown.show}>
|
||||
<Icon s hoverable name="MoreSmallList" />
|
||||
</div>
|
||||
<MenuItem icon="Delete" on:click={showModal}>Delete</MenuItem>
|
||||
<MenuItem icon="Delete" on:click={closeOnClick(confirmDeleteDialog.show)}>Delete</MenuItem>
|
||||
</ActionMenu>
|
||||
|
||||
<ConfirmDialog
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
import { store } from "builderStore"
|
||||
import { notifications } from "@budibase/bbui"
|
||||
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
||||
import { Icon, Popover, Modal, ModalContent, Input } from "@budibase/bbui"
|
||||
import { DropdownContainer, DropdownItem } from "components/common/Dropdowns"
|
||||
import { ActionMenu, MenuItem, Icon, Modal, ModalContent, Input } from "@budibase/bbui"
|
||||
import { cloneDeep } from "lodash/fp"
|
||||
|
||||
export let layout
|
||||
|
@ -35,25 +34,14 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<div bind:this={anchor}>
|
||||
<div class="icon" on:click={() => dropdown.show()}>
|
||||
<Icon name="MoreSmallList" />
|
||||
<ActionMenu bind:this={dropdown} let:closeOnClick>
|
||||
<div slot="button" class="icon" on:click={dropdown.show}>
|
||||
<Icon s hoverable name="MoreSmallList" />
|
||||
</div>
|
||||
<Popover bind:this={dropdown} {anchor} align="left">
|
||||
<DropdownContainer>
|
||||
<DropdownItem
|
||||
icon="ri-pencil-line"
|
||||
title="Edit"
|
||||
on:click={() => editLayoutNameModal.show()}
|
||||
/>
|
||||
<DropdownItem
|
||||
icon="ri-delete-bin-line"
|
||||
title="Delete"
|
||||
on:click={() => confirmDeleteDialog.show()}
|
||||
/>
|
||||
</DropdownContainer>
|
||||
</Popover>
|
||||
</div>
|
||||
<MenuItem icon="Edit" on:click={closeOnClick(editLayoutNameModal.show)}>Edit</MenuItem>
|
||||
<MenuItem icon="Delete" on:click={closeOnClick(confirmDeleteDialog.show)}>Delete</MenuItem>
|
||||
</ActionMenu>
|
||||
|
||||
<ConfirmDialog
|
||||
bind:this={confirmDeleteDialog}
|
||||
title="Confirm Deletion"
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
import { store, allScreens } from "builderStore"
|
||||
import { notifications } from "@budibase/bbui"
|
||||
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
||||
import { ActionMenu, MenuItem, Icon, Popover } from "@budibase/bbui"
|
||||
import { DropdownContainer, DropdownItem } from "components/common/Dropdowns"
|
||||
import { ActionMenu, MenuItem, Icon } from "@budibase/bbui"
|
||||
|
||||
export let screenId
|
||||
|
||||
|
|
Loading…
Reference in New Issue