mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
feat: add Grid component
This commit is contained in:
parent
353741daea
commit
f9f58999b2
7 changed files with 341 additions and 0 deletions
19
src/Grid/Row.svelte
Normal file
19
src/Grid/Row.svelte
Normal file
|
@ -0,0 +1,19 @@
|
|||
<script>
|
||||
export let as = false;
|
||||
export let condensed = false;
|
||||
|
||||
$: props = {
|
||||
...$$restProps,
|
||||
class: [$$restProps.class, "bx--row", condensed && "bx--row--condensed"]
|
||||
.filter(Boolean)
|
||||
.join(" ")
|
||||
};
|
||||
</script>
|
||||
|
||||
{#if as}
|
||||
<slot {props} />
|
||||
{:else}
|
||||
<div {...props}>
|
||||
<slot />
|
||||
</div>
|
||||
{/if}
|
Loading…
Add table
Add a link
Reference in a new issue