mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
fix(link)!: do not render p
for disabled link
Closes #1924 Svelte 5 will not compile if `div` is nested inside `p` element. Refactor Link to render an `a` instead of `p` when disabled.
This commit is contained in:
parent
a0d5028540
commit
8bffc17d65
4 changed files with 24 additions and 21 deletions
4
types/Link/Link.svelte.d.ts
vendored
4
types/Link/Link.svelte.d.ts
vendored
|
@ -1,7 +1,7 @@
|
|||
import type { SvelteComponentTyped } from "svelte";
|
||||
import type { SvelteHTMLElements } from "svelte/elements";
|
||||
|
||||
type RestProps = SvelteHTMLElements["a"] & SvelteHTMLElements["p"];
|
||||
type RestProps = SvelteHTMLElements["a"];
|
||||
|
||||
export interface LinkProps extends RestProps {
|
||||
/**
|
||||
|
@ -45,7 +45,7 @@ export interface LinkProps extends RestProps {
|
|||
* Obtain a reference to the top-level HTML element
|
||||
* @default null
|
||||
*/
|
||||
ref?: null | HTMLAnchorElement | HTMLParagraphElement;
|
||||
ref?: null | HTMLAnchorElement;
|
||||
|
||||
[key: `data-${string}`]: any;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue