Simplified modal header construction
This commit is contained in:
parent
9a49535748
commit
5b4535feca
|
@ -65,23 +65,17 @@
|
||||||
aria-modal="true"
|
aria-modal="true"
|
||||||
>
|
>
|
||||||
<div class="spectrum-Dialog-grid">
|
<div class="spectrum-Dialog-grid">
|
||||||
|
<h1
|
||||||
|
class="spectrum-Dialog-heading spectrum-Dialog-heading--noHeader"
|
||||||
|
class:noDivider={!showDivider}
|
||||||
|
class:header-spacing={$$slots.header}
|
||||||
|
>
|
||||||
{#if title}
|
{#if title}
|
||||||
<h1
|
|
||||||
class="spectrum-Dialog-heading spectrum-Dialog-heading--noHeader"
|
|
||||||
class:noDivider={!showDivider}
|
|
||||||
class:header-spacing={$$slots.header}
|
|
||||||
>
|
|
||||||
{title}
|
{title}
|
||||||
</h1>
|
|
||||||
{:else if $$slots.header}
|
{:else if $$slots.header}
|
||||||
<h1
|
|
||||||
class="spectrum-Dialog-heading spectrum-Dialog-heading--noHeader"
|
|
||||||
class:noDivider={!showDivider}
|
|
||||||
class:header-spacing={$$slots.header}
|
|
||||||
>
|
|
||||||
<slot name="header" />
|
<slot name="header" />
|
||||||
</h1>
|
|
||||||
{/if}
|
{/if}
|
||||||
|
</h1>
|
||||||
{#if showDivider && (title || $$slots.header)}
|
{#if showDivider && (title || $$slots.header)}
|
||||||
<Divider size="M" />
|
<Divider size="M" />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
Loading…
Reference in New Issue