mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +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" }
|
||||
],
|
||||
"typedefs": [],
|
||||
"rest_props": { "type": "Element", "name": "p" }
|
||||
"rest_props": { "type": "Element", "name": "p | a" }
|
||||
},
|
||||
{
|
||||
"moduleName": "ListBox",
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
<script>
|
||||
/** @restProps {p | a} */
|
||||
|
||||
/**
|
||||
* Specify the size of the link
|
||||
* @type {"sm" | "lg"}
|
||||
|
|
|
@ -1,29 +1,9 @@
|
|||
<script lang="ts">
|
||||
import { Link } from "../types";
|
||||
import { Link, OutboundLink } from "../types";
|
||||
</script>
|
||||
|
||||
<Link href="https://www.carbondesignsystem.com/">Carbon Design System</Link>
|
||||
|
||||
<Link href="https://www.carbondesignsystem.com/" target="_blank">
|
||||
<Link size="sm" inline disabled download visited href="/" target="_blank">
|
||||
Carbon Design System
|
||||
</Link>
|
||||
|
||||
<Link 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>
|
||||
<OutboundLink inline href="https://www.carbondesignsystem.com/" />
|
||||
|
|
3
types/Link/Link.svelte.d.ts
vendored
3
types/Link/Link.svelte.d.ts
vendored
|
@ -2,7 +2,8 @@
|
|||
import { SvelteComponentTyped } from "svelte";
|
||||
|
||||
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
|
||||
* @default undefined
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue