Simplified modal header construction
This commit is contained in:
parent
b2b5fde7ba
commit
d94ff81e0e
|
@ -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}
|
||||
|
|
Loading…
Reference in New Issue