test(grid): add unit tests

This commit is contained in:
Eric Liu 2025-03-20 17:19:33 -07:00
commit d45409c7f3
5 changed files with 181 additions and 36 deletions

View file

@ -0,0 +1,44 @@
<script lang="ts">
import { Grid } from "carbon-components-svelte";
export let condensed = false;
export let narrow = false;
export let fullWidth = false;
export let noGutter = false;
export let noGutterLeft = false;
export let noGutterRight = false;
export let padding = false;
export let as = false;
</script>
{#if as}
<Grid
{as}
{condensed}
{narrow}
{fullWidth}
{noGutter}
{noGutterLeft}
{noGutterRight}
{padding}
{...$$restProps}
let:props
>
<header {...props}>
<slot />
</header>
</Grid>
{:else}
<Grid
{condensed}
{narrow}
{fullWidth}
{noGutter}
{noGutterLeft}
{noGutterRight}
{padding}
{...$$restProps}
>
<slot />
</Grid>
{/if}