converts Drawer component to Spectrum
This commit is contained in:
parent
cdfa80e31a
commit
77bbb440cb
|
@ -2,6 +2,8 @@
|
||||||
import { slide } from "svelte/transition"
|
import { slide } from "svelte/transition"
|
||||||
import Portal from "svelte-portal"
|
import Portal from "svelte-portal"
|
||||||
import ActionButton from "../ActionButton/ActionButton.svelte"
|
import ActionButton from "../ActionButton/ActionButton.svelte"
|
||||||
|
import Body from "../Typography/Body.svelte"
|
||||||
|
import Heading from "../Typography/Heading.svelte"
|
||||||
|
|
||||||
export let title
|
export let title
|
||||||
|
|
||||||
|
@ -35,8 +37,8 @@
|
||||||
<section class="drawer" transition:slide>
|
<section class="drawer" transition:slide>
|
||||||
<header>
|
<header>
|
||||||
<div class="text">
|
<div class="text">
|
||||||
<div class="title">{title}</div>
|
<Heading xs>{title}</Heading>
|
||||||
<slot name="description" />
|
<Body xxs><slot name="description" /></Body>
|
||||||
</div>
|
</div>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<slot name="buttons" />
|
<slot name="buttons" />
|
||||||
|
@ -64,24 +66,18 @@
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border-bottom: var(--border-light);
|
border-bottom: var(--border-light);
|
||||||
padding: var(--spacing-m);
|
padding: 0 var(--spectrum-alias-item-padding-s) ;
|
||||||
|
}
|
||||||
|
header :global(*) + :global(*) {
|
||||||
|
margin: var(--spectrum-alias-grid-baseline);
|
||||||
}
|
}
|
||||||
|
|
||||||
.controls {
|
.controls {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-auto-flow: column;
|
grid-auto-flow: column;
|
||||||
grid-gap: var(--spacing-m);
|
grid-gap: var(--spectrum-alias-item-padding-s);
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.close {
|
|
||||||
font-size: var(--font-size-xl);
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.title {
|
|
||||||
font-weight: bold;
|
|
||||||
margin-right: var(--spacing-m);
|
|
||||||
}
|
|
||||||
.text {
|
.text {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
|
Loading…
Reference in New Issue