mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
chore(links): add rel="" to all links
This commit is contained in:
parent
2a63aa7729
commit
32077693e0
7 changed files with 8 additions and 2 deletions
|
@ -15,6 +15,7 @@
|
||||||
{#if href}
|
{#if href}
|
||||||
<a
|
<a
|
||||||
href="{href}"
|
href="{href}"
|
||||||
|
rel="{$$restProps.target === '_blank' ? 'noopener noreferrer' : undefined}"
|
||||||
role="button"
|
role="button"
|
||||||
class:bx--skeleton="{true}"
|
class:bx--skeleton="{true}"
|
||||||
class:bx--btn="{true}"
|
class:bx--btn="{true}"
|
||||||
|
|
|
@ -123,6 +123,7 @@
|
||||||
{#if skeleton}
|
{#if skeleton}
|
||||||
<ButtonSkeleton
|
<ButtonSkeleton
|
||||||
href="{href}"
|
href="{href}"
|
||||||
|
rel="{$$restProps.target === '_blank' ? 'noopener noreferrer' : undefined}"
|
||||||
small="{size === 'small'}"
|
small="{size === 'small'}"
|
||||||
{...$$restProps}
|
{...$$restProps}
|
||||||
style="{hasIconOnly && 'width: 3rem;'}"
|
style="{hasIconOnly && 'width: 3rem;'}"
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
class:bx--link--inline="{inline}"
|
class:bx--link--inline="{inline}"
|
||||||
class:bx--link--visited="{visited}"
|
class:bx--link--visited="{visited}"
|
||||||
rel="{$$restProps.target === '_blank' ? 'noopener noreferrer' : undefined}"
|
rel="{$$restProps.target === '_blank' ? 'noopener noreferrer' : undefined}"
|
||||||
{href}
|
href="{href}"
|
||||||
{...$$restProps}
|
{...$$restProps}
|
||||||
on:click
|
on:click
|
||||||
on:mouseover
|
on:mouseover
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
class:bx--tile--light="{light}"
|
class:bx--tile--light="{light}"
|
||||||
{...$$restProps}
|
{...$$restProps}
|
||||||
href="{href}"
|
href="{href}"
|
||||||
|
rel=""
|
||||||
on:click
|
on:click
|
||||||
on:click="{() => {
|
on:click="{() => {
|
||||||
clicked = !clicked;
|
clicked = !clicked;
|
||||||
|
|
|
@ -41,8 +41,9 @@
|
||||||
class:bx--header__action="{true}"
|
class:bx--header__action="{true}"
|
||||||
class:bx--header__action--active="{linkIsActive}"
|
class:bx--header__action--active="{linkIsActive}"
|
||||||
class:action-link="{true}"
|
class:action-link="{true}"
|
||||||
{...$$restProps}
|
|
||||||
href="{href}"
|
href="{href}"
|
||||||
|
rel="{$$restProps.target === '_blank' ? 'noopener noreferrer' : undefined}"
|
||||||
|
{...$$restProps}
|
||||||
>
|
>
|
||||||
<Icon {...icon} />
|
<Icon {...icon} />
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
<a
|
<a
|
||||||
bind:this="{ref}"
|
bind:this="{ref}"
|
||||||
href="{href}"
|
href="{href}"
|
||||||
|
rel="{$$restProps.target === '_blank' ? 'noopener noreferrer' : undefined}"
|
||||||
class:bx--switcher__item-link="{true}"
|
class:bx--switcher__item-link="{true}"
|
||||||
{...$$restProps}
|
{...$$restProps}
|
||||||
on:click
|
on:click
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
bind:this="{ref}"
|
bind:this="{ref}"
|
||||||
aria-current="{isSelected ? 'page' : undefined}"
|
aria-current="{isSelected ? 'page' : undefined}"
|
||||||
href="{href}"
|
href="{href}"
|
||||||
|
rel="{$$restProps.target === '_blank' ? 'noopener noreferrer' : undefined}"
|
||||||
class:bx--side-nav__link="{true}"
|
class:bx--side-nav__link="{true}"
|
||||||
class:bx--side-nav__link--current="{isSelected}"
|
class:bx--side-nav__link--current="{isSelected}"
|
||||||
{...$$restProps}
|
{...$$restProps}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue