fix: inner modal

This commit is contained in:
Arman
2022-11-02 10:50:34 +01:00
parent c03e59c8dc
commit 694a8cff84
2 changed files with 38 additions and 34 deletions
+27 -21
View File
@@ -1,27 +1,33 @@
<script>
import FormItem from '$lib/elements/forms/formItem.svelte';
export let show = false;
</script>
{#if show}
<section class="modal is-inner-modal">
<header class="modal-header u-flex-wrap">
<h4 class="modal-title body-text-1">
<slot name="title" />
</h4>
<button
type="button"
class="x-button"
aria-label="Close"
title="Close"
on:click={() => (show = false)}>
<span class="icon-x" aria-hidden="true" />
</button>
<p class="u-flex-basis-100-percent">
<slot name="subtitle" />
</p>
</header>
<div class="modal-content">
<slot name="content" />
</div>
</section>
<FormItem>
<section class="modal is-inner-modal">
<div class="modal-form">
<header class="modal-header u-flex-wrap">
<h4 class="modal-title body-text-1">
<slot name="title" />
</h4>
<button
type="button"
class="x-button"
aria-label="Close"
title="Close"
on:click={() => (show = false)}>
<span class="icon-x" aria-hidden="true" />
</button>
<p class="u-flex-basis-100-percent">
<slot name="subtitle" />
</p>
</header>
<div class="modal-content">
<slot name="content" />
</div>
</div>
</section>
</FormItem>
{/if}
@@ -39,18 +39,16 @@
{options}
required />
<ul class="form-list">
{#if !showCustomId}
<div>
<Pill button on:click={() => (showCustomId = !showCustomId)}>
<span class="icon-pencil" aria-hidden="true" /><span class="text">
Function ID
</span>
</Pill>
</div>
{:else}
<CustomId bind:show={showCustomId} name="Function" bind:id={$createFunction.id} />
{/if}
</ul>
{#if !showCustomId}
<div>
<Pill button on:click={() => (showCustomId = !showCustomId)}>
<span class="icon-pencil" aria-hidden="true" /><span class="text">
Function ID
</span>
</Pill>
</div>
{:else}
<CustomId bind:show={showCustomId} name="Function" bind:id={$createFunction.id} />
{/if}
</FormList>
</WizardStep>