mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-19 11:59:34 +00:00
feat(grid)!: replace as
with tag
prop
This commit is contained in:
parent
c1c8309443
commit
0752447667
4 changed files with 38 additions and 59 deletions
9
types/Grid/Grid.svelte.d.ts
vendored
9
types/Grid/Grid.svelte.d.ts
vendored
|
@ -4,11 +4,10 @@ import type { SvelteComponentTyped } from "svelte";
|
|||
export interface GridProps
|
||||
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., <Grid let:props><header {...props}>...</header></Grid>)
|
||||
* @default false
|
||||
* Specify the element tag
|
||||
* @default "div"
|
||||
*/
|
||||
as?: boolean;
|
||||
tag?: string;
|
||||
|
||||
/**
|
||||
* Set to `true` to use the condensed variant
|
||||
|
@ -56,5 +55,5 @@ export interface GridProps
|
|||
export default class Grid extends SvelteComponentTyped<
|
||||
GridProps,
|
||||
{},
|
||||
{ default: { props: { class: string; [key: string]: any } } }
|
||||
{ default: {} }
|
||||
> {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue