2021-04-27 15:06:08 +02:00
|
|
|
<script>
|
|
|
|
export let horizontal = false
|
|
|
|
export let paddingX = "M"
|
|
|
|
export let paddingY = "M"
|
|
|
|
export let noPadding = false
|
|
|
|
export let gap = "M"
|
|
|
|
export let noGap = false
|
2021-05-07 14:29:05 +02:00
|
|
|
export let alignContent = "normal"
|
2021-04-27 15:06:08 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<div
|
2021-05-07 14:29:05 +02:00
|
|
|
style="align-content:{alignContent};"
|
2021-04-27 15:06:08 +02:00
|
|
|
class:horizontal
|
|
|
|
class="container paddingX-{!noPadding && paddingX} paddingY-{!noPadding &&
|
|
|
|
paddingY} gap-{!noGap && gap}"
|
|
|
|
>
|
|
|
|
<slot />
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
.container {
|
|
|
|
display: grid;
|
|
|
|
grid-template-columns: 1fr;
|
|
|
|
}
|
|
|
|
.paddingX-S {
|
|
|
|
padding-left: var(--spacing-s);
|
|
|
|
padding-right: var(--spacing-s);
|
|
|
|
}
|
|
|
|
.paddingX-M {
|
|
|
|
padding-left: var(--spacing-m);
|
|
|
|
padding-right: var(--spacing-m);
|
|
|
|
}
|
|
|
|
.paddingX-L {
|
|
|
|
padding-left: var(--spacing-l);
|
|
|
|
padding-right: var(--spacing-l);
|
|
|
|
}
|
|
|
|
.paddingY-S {
|
|
|
|
padding-top: var(--spacing-s);
|
|
|
|
padding-bottom: var(--spacing-s);
|
|
|
|
}
|
|
|
|
.paddingY-M {
|
|
|
|
padding-top: var(--spacing-m);
|
|
|
|
padding-bottom: var(--spacing-m);
|
|
|
|
}
|
|
|
|
.paddingY-L {
|
|
|
|
padding-top: var(--spacing-l);
|
|
|
|
padding-bottom: var(--spacing-l);
|
|
|
|
}
|
2021-05-06 14:58:07 +02:00
|
|
|
.gap-XS {
|
|
|
|
grid-gap: var(--spacing-s);
|
|
|
|
}
|
2021-04-27 15:06:08 +02:00
|
|
|
.gap-S {
|
|
|
|
grid-gap: var(--spectrum-alias-grid-gutter-xsmall);
|
|
|
|
}
|
|
|
|
.gap-M {
|
|
|
|
grid-gap: var(--spectrum-alias-grid-gutter-small);
|
|
|
|
}
|
|
|
|
.gap-L {
|
|
|
|
grid-gap: var(--spectrum-alias-grid-gutter-medium);
|
|
|
|
}
|
|
|
|
.horizontal.gap-S :global(*) + :global(*) {
|
|
|
|
margin-left: var(--spectrum-alias-grid-gutter-xsmall);
|
|
|
|
}
|
|
|
|
.horizontal.gap-M :global(*) + :global(*) {
|
|
|
|
margin-left: var(--spectrum-alias-grid-gutter-small);
|
|
|
|
}
|
|
|
|
.horizontal.gap-L :global(*) + :global(*) {
|
|
|
|
margin-left: var(--spectrum-alias-grid-gutter-medium);
|
|
|
|
}
|
|
|
|
</style>
|