mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
fix(link): $$restProps
should extend p
, a
HTML attributes (#1233)
* fix(link): restProps should extend `p` or `a` tag attributes * Run "yarn build:docs" * test(link): assert anchor link rest attributes
This commit is contained in:
parent
e8da9d7e9b
commit
45c272642f
4 changed files with 8 additions and 25 deletions
|
@ -5347,7 +5347,7 @@
|
||||||
{ "type": "forwarded", "name": "mouseleave", "element": "p" }
|
{ "type": "forwarded", "name": "mouseleave", "element": "p" }
|
||||||
],
|
],
|
||||||
"typedefs": [],
|
"typedefs": [],
|
||||||
"rest_props": { "type": "Element", "name": "p" }
|
"rest_props": { "type": "Element", "name": "p | a" }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"moduleName": "ListBox",
|
"moduleName": "ListBox",
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
<script>
|
<script>
|
||||||
|
/** @restProps {p | a} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specify the size of the link
|
* Specify the size of the link
|
||||||
* @type {"sm" | "lg"}
|
* @type {"sm" | "lg"}
|
||||||
|
|
|
@ -1,29 +1,9 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Link } from "../types";
|
import { Link, OutboundLink } from "../types";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Link href="https://www.carbondesignsystem.com/">Carbon Design System</Link>
|
<Link size="sm" inline disabled download visited href="/" target="_blank">
|
||||||
|
|
||||||
<Link href="https://www.carbondesignsystem.com/" target="_blank">
|
|
||||||
Carbon Design System
|
Carbon Design System
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<Link inline href="https://www.carbondesignsystem.com/">
|
<OutboundLink inline href="https://www.carbondesignsystem.com/" />
|
||||||
Carbon Design System
|
|
||||||
</Link>
|
|
||||||
|
|
||||||
<Link size="lg" href="https://www.carbondesignsystem.com/">
|
|
||||||
Carbon Design System
|
|
||||||
</Link>
|
|
||||||
|
|
||||||
<Link size="sm" href="https://www.carbondesignsystem.com/">
|
|
||||||
Carbon Design System
|
|
||||||
</Link>
|
|
||||||
|
|
||||||
<Link disabled href="https://www.carbondesignsystem.com/">
|
|
||||||
Carbon Design System
|
|
||||||
</Link>
|
|
||||||
|
|
||||||
<Link visited href="https://www.carbondesignsystem.com/">
|
|
||||||
Carbon Design System
|
|
||||||
</Link>
|
|
||||||
|
|
3
types/Link/Link.svelte.d.ts
vendored
3
types/Link/Link.svelte.d.ts
vendored
|
@ -2,7 +2,8 @@
|
||||||
import { SvelteComponentTyped } from "svelte";
|
import { SvelteComponentTyped } from "svelte";
|
||||||
|
|
||||||
export interface LinkProps
|
export interface LinkProps
|
||||||
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["p"]> {
|
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["p"]>,
|
||||||
|
svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["a"]> {
|
||||||
/**
|
/**
|
||||||
* Specify the size of the link
|
* Specify the size of the link
|
||||||
* @default undefined
|
* @default undefined
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue