feat(row)!: replace as with tag prop

This commit is contained in:
Eric Liu 2023-01-08 14:22:52 -08:00
commit 1e31e71bcf
4 changed files with 36 additions and 57 deletions

View file

@ -4,11 +4,10 @@ import type { SvelteComponentTyped } from "svelte";
export interface RowProps
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
/**
* Set to `true` to render a custom HTML element
* Props are destructured as `props` in the default slot (e.g., <Row let:props><section {...props}>...</section></Row>)
* @default false
* Specify the element tag
* @default "div"
*/
as?: boolean;
tag?: string;
/**
* Set to `true` to use the condensed variant
@ -50,5 +49,5 @@ export interface RowProps
export default class Row extends SvelteComponentTyped<
RowProps,
{},
{ default: { props: { class: string; [key: string]: any } } }
{ default: {} }
> {}