mirror of https://github.com/Budibase/budibase.git
5 changed files with 49 additions and 15 deletions
@ -0,0 +1,41 @@ |
|||
<script> |
|||
import { createEventDispatcher } from "svelte" |
|||
import { DropdownMenu, TextButton as Button, Icon } from "@budibase/bbui" |
|||
import AttachmentList from "../../attachments/AttachmentList.svelte" |
|||
// import Modal from "./Modal.svelte" |
|||
|
|||
const dispatch = createEventDispatcher() |
|||
|
|||
let anchor |
|||
let dropdown |
|||
|
|||
export let files |
|||
</script> |
|||
|
|||
<div bind:this={anchor}> |
|||
<Button text small on:click={dropdown.show}> |
|||
<Icon name="edit" /> |
|||
</Button> |
|||
<AttachmentList {files} /> |
|||
</div> |
|||
<DropdownMenu bind:this={dropdown} {anchor} align="left"> |
|||
<h5>Edit Attachment(s)</h5> |
|||
<!-- <Modal |
|||
{_bb} |
|||
{model} |
|||
onClosed={dropdown.hide} |
|||
on:newRecord={() => dispatch('newRecord')} /> --> |
|||
</DropdownMenu> |
|||
|
|||
<style> |
|||
div { |
|||
display: grid; |
|||
grid-template-columns: auto auto; |
|||
place-items: start center; |
|||
} |
|||
h5 { |
|||
padding: var(--spacing-xl) 0 0 var(--spacing-xl); |
|||
margin: 0; |
|||
font-weight: 500; |
|||
} |
|||
</style> |
|||
Loading…
Reference in new issue