feat: add Grid component

This commit is contained in:
Eric Liu 2020-07-21 07:46:54 -07:00
commit f9f58999b2
7 changed files with 341 additions and 0 deletions

25
src/Grid/Grid.svelte Normal file
View file

@ -0,0 +1,25 @@
<script>
export let as = false;
export let condensed = false;
export let fullWidth = false;
$: props = {
...$$restProps,
class: [
$$restProps.class,
"bx--grid",
condensed && "bx--grid--condensed",
fullWidth && "bx--grid--full-width"
]
.filter(Boolean)
.join(" ")
};
</script>
{#if as}
<slot {props} />
{:else}
<div {...props}>
<slot />
</div>
{/if}