Fix editor and consolidate file upload widget
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
export let showModal; // boolean
|
||||
export let closeOnClick = true; // boolean
|
||||
export let showCloseButton = true; // boolean
|
||||
export const closeDialog = _ => doClose();
|
||||
|
||||
let dialog; // HTMLDialogElement
|
||||
|
||||
@@ -32,19 +32,21 @@
|
||||
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<dialog
|
||||
bind:this={dialog}
|
||||
on:close={close}
|
||||
bind:this={dialog}
|
||||
on:close={close}
|
||||
on:cancel={doClose}
|
||||
on:click|self={close}
|
||||
on:click|self={close}
|
||||
>
|
||||
<div on:click|stopPropagation>
|
||||
<slot name="header" />
|
||||
<slot />
|
||||
<!-- svelte-ignore a11y-autofocus -->
|
||||
{#if showCloseButton}
|
||||
<Button variant="secondary" on:click={doClose}>Close</Button>
|
||||
{/if}
|
||||
</div>
|
||||
<div on:click|stopPropagation>
|
||||
<slot name="header" />
|
||||
<slot />
|
||||
<div class="button-row">
|
||||
<slot name="buttons">
|
||||
<!-- svelte-ignore a11y-autofocus -->
|
||||
<Button variant="secondary" on:click={doClose}>Close</Button>
|
||||
</slot>
|
||||
</div>
|
||||
</div>
|
||||
</dialog>
|
||||
|
||||
<style>
|
||||
@@ -53,6 +55,7 @@
|
||||
border-radius: 0.2em;
|
||||
border: none;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
dialog::backdrop {
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
@@ -85,4 +88,10 @@
|
||||
button {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.button-row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: var(--spacing-sm);
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user