feat(column)!: replace as with tag prop

This commit is contained in:
Eric Liu 2023-01-08 14:28:58 -08:00
commit 12dfff70fa
4 changed files with 40 additions and 55 deletions

View file

@ -13,11 +13,10 @@ export type ColumnBreakpoint = ColumnSize | ColumnSizeDescriptor;
export interface ColumnProps
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., <Column let:props><article {...props}>...</article></Column>)
* @default false
* Specify the element tag
* @default "div"
*/
as?: boolean;
tag?: string;
/**
* Set to `true` to remove the gutter
@ -83,5 +82,5 @@ export interface ColumnProps
export default class Column extends SvelteComponentTyped<
ColumnProps,
{},
{ default: { props: { class: string; [key: string]: any } } }
{ default: {} }
> {}