Simplified modal header construction

This commit is contained in:
Dean 2022-04-20 09:23:09 +01:00
parent b2b5fde7ba
commit d94ff81e0e
1 changed files with 9 additions and 15 deletions

View File

@ -65,23 +65,17 @@
aria-modal="true"
>
<div class="spectrum-Dialog-grid">
<h1
class="spectrum-Dialog-heading spectrum-Dialog-heading--noHeader"
class:noDivider={!showDivider}
class:header-spacing={$$slots.header}
>
{#if title}
<h1
class="spectrum-Dialog-heading spectrum-Dialog-heading--noHeader"
class:noDivider={!showDivider}
class:header-spacing={$$slots.header}
>
{title}
</h1>
{:else if $$slots.header}
<h1
class="spectrum-Dialog-heading spectrum-Dialog-heading--noHeader"
class:noDivider={!showDivider}
class:header-spacing={$$slots.header}
>
<slot name="header" />
</h1>
{/if}
</h1>
{#if showDivider && (title || $$slots.header)}
<Divider size="M" />
{/if}