Skip to content
This repository has been archived by the owner on Oct 28, 2023. It is now read-only.

Commit

Permalink
Merge pull request #32 from javaBin/linkFix
Browse files Browse the repository at this point in the history
Fixed Link tag
  • Loading branch information
alexander-svendsen authored Mar 24, 2020
2 parents 656e888 + 35a885c commit df2bfa2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
13 changes: 6 additions & 7 deletions src/components/Link/Link.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@
background: none;
text-align: center;
cursor: pointer;
a {
color: $color-logo-red;
text-decoration: none;
}
text-decoration: none;
color: $color-logo-red;

&:hover {
text-decoration: none;
background: $color-logo-red-dark;
a {
color: white;
}
color: white;

}
}
14 changes: 8 additions & 6 deletions src/components/Link/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@ interface LinkProps {
function Link(props: LinkProps) {
return (
props.external
? <div className={styles.link}>
<a href={props.url} target={props.noBlankTarget ? '' : '_blank'}>{props.children}</a>
</div>
: <div className={styles.link}>
<RouterLink to={props.url}>
? <a href={props.url} className={styles.link} target={props.noBlankTarget ? '' : '_blank'}>
<span >{props.children}</span>
</a>
:
<RouterLink to={props.url} className={styles.link}>
<span >
{props.children}
</span>
</RouterLink>
</div>

)
}

Expand Down

0 comments on commit df2bfa2

Please sign in to comment.