Skip to content

Commit

Permalink
Removed log, removed color transition, changed css classes for case w…
Browse files Browse the repository at this point in the history
…hen an euiLink is given an onClick, as well as an href and disabled.
  • Loading branch information
ThomThomson committed Oct 16, 2019
1 parent 0a740ec commit 9e5aa1b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
1 change: 0 additions & 1 deletion src-docs/src/views/link/link_disable.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export class LinkDisable extends Component {
}

toggleLinkDisable = () => {
console.log(this.state.disableLink);
this.setState(prevState => ({ disableLink: !prevState.disableLink }));
};

Expand Down
1 change: 0 additions & 1 deletion src/components/link/_link.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.euiLink {
@include euiLink;
transition: color $euiAnimSpeedNormal $euiAnimSlightResistance;
}

$textColors: (
Expand Down
15 changes: 6 additions & 9 deletions src/components/link/link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,13 @@ const EuiLink = forwardRef<HTMLAnchorElement | HTMLButtonElement, EuiLinkProps>(
},
ref
) => {
const classes = classNames(
'euiLink',
disabled ? 'euilink-disabled' : colorsToClassNameMap[color],
className
);

if (href === undefined) {
const buttonProps = {
className: classes,
className: classNames(
'euiLink',
disabled ? 'euilink-disabled' : colorsToClassNameMap[color],
className
),
type,
onClick,
disabled,
Expand All @@ -98,9 +96,8 @@ const EuiLink = forwardRef<HTMLAnchorElement | HTMLButtonElement, EuiLinkProps>(
}

const secureRel = getSecureRelForTarget({ href, target, rel });

const anchorProps = {
className: classes,
className: classNames('euiLink', colorsToClassNameMap[color], className),
href,
target,
rel: secureRel,
Expand Down

0 comments on commit 9e5aa1b

Please sign in to comment.