Compare commits

...

2 Commits

Author SHA1 Message Date
6c2b3466ba v0.5.2 2021-03-29 14:55:50 +02:00
31c9e30d3d Fixed Link colors
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-03-29 14:55:29 +02:00
3 changed files with 6 additions and 5 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@dzeio/components",
"version": "0.5.1",
"version": "0.5.2",
"license": "MIT",
"main": "./src/index.mjs",
"types": "./src/index.d.ts",

View File

@ -1,9 +1,9 @@
@import '../config'
.link
color $infoLight
color $infoDark
@media (prefers-color-scheme dark)
color $infoDark
color $infoLight
&:hover
text-decoration underline

View File

@ -12,6 +12,7 @@ interface Props {
/**
* Override external detection system
*/
noStyle?: boolean
external?: boolean
}
@ -23,7 +24,7 @@ export default class Link extends React.Component<Props> {
// external link
return (
<a
className={buildClassName(this.props.className, css.link)}
className={buildClassName(this.props.className, [css.link, !this.props.noStyle])}
href={this.props.href}
rel="noreferrer nofollow"
target="_blank"
@ -35,7 +36,7 @@ export default class Link extends React.Component<Props> {
return (
<NextLink href={this.props.href}>
<a
className={buildClassName(this.props.className, css.link)}
className={buildClassName(this.props.className, [css.link, !this.props.noStyle])}
>{this.props.children}</a>
</NextLink>
)