chore(links): add rel="" to all links

This commit is contained in:
josefaidt 2020-10-08 14:02:08 -05:00
commit 32077693e0
7 changed files with 8 additions and 2 deletions

View file

@ -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}"

View file

@ -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;'}"

View file

@ -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

View file

@ -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;

View file

@ -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>

View file

@ -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

View file

@ -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}