mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
Merge pull request #259 from josefaidt/258-remove-anchor-visited-styles
fix(link): remove visited styles by default
This commit is contained in:
commit
c04ea80a9f
2 changed files with 9 additions and 0 deletions
|
@ -9,5 +9,6 @@ export const Default = () => ({
|
||||||
href: text("The link href (href)", "#"),
|
href: text("The link href (href)", "#"),
|
||||||
inline: boolean("Use the in-line variant (inline)", false),
|
inline: boolean("Use the in-line variant (inline)", false),
|
||||||
disabled: boolean("Disabled (disabled)", false),
|
disabled: boolean("Disabled (disabled)", false),
|
||||||
|
visited: boolean('Allow visited styles', false),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -11,6 +11,12 @@
|
||||||
*/
|
*/
|
||||||
export let disabled = false;
|
export let disabled = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set to `true` to allow visited styles
|
||||||
|
* @type {boolean} [visited=false]
|
||||||
|
*/
|
||||||
|
export let visited = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Obtain a reference to the top-level HTML element
|
* Obtain a reference to the top-level HTML element
|
||||||
* @type {null | HTMLAnchorElement | HTMLParagraphElement} [ref=null]
|
* @type {null | HTMLAnchorElement | HTMLParagraphElement} [ref=null]
|
||||||
|
@ -24,6 +30,7 @@
|
||||||
class:bx--link="{true}"
|
class:bx--link="{true}"
|
||||||
class:bx--link--disabled="{disabled}"
|
class:bx--link--disabled="{disabled}"
|
||||||
class:bx--link--inline="{inline}"
|
class:bx--link--inline="{inline}"
|
||||||
|
class:bx--link--visited="{visited}"
|
||||||
{...$$restProps}
|
{...$$restProps}
|
||||||
on:click
|
on:click
|
||||||
on:mouseover
|
on:mouseover
|
||||||
|
@ -38,6 +45,7 @@
|
||||||
class:bx--link="{true}"
|
class:bx--link="{true}"
|
||||||
class:bx--link--disabled="{disabled}"
|
class:bx--link--disabled="{disabled}"
|
||||||
class:bx--link--inline="{inline}"
|
class:bx--link--inline="{inline}"
|
||||||
|
class:bx--link--visited="{visited}"
|
||||||
rel="{$$restProps.target === '_blank' ? 'noopener noreferrer' : undefined}"
|
rel="{$$restProps.target === '_blank' ? 'noopener noreferrer' : undefined}"
|
||||||
{...$$restProps}
|
{...$$restProps}
|
||||||
on:click
|
on:click
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue