Skip to content

Commit 2d3960d

Browse files
fix(ClickableTile): use Link (#7763)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent be7f7da commit 2d3960d

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

packages/components/src/components/tile/_tile.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@
7575
text-decoration: none;
7676
}
7777

78+
.#{$prefix}--tile--clickable:hover,
79+
.#{$prefix}--tile--clickable:active {
80+
color: $text-01;
81+
text-decoration: none;
82+
}
83+
7884
.#{$prefix}--tile--selectable {
7985
padding-right: $carbon--spacing-09;
8086
}

packages/react/src/components/Tile/Tile.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import React, { Component } from 'react';
99
import PropTypes from 'prop-types';
1010
import classNames from 'classnames';
1111
import { settings } from 'carbon-components';
12+
import Link from '../Link';
1213
import {
1314
CheckmarkFilled16 as CheckmarkFilled,
1415
ChevronDown16,
@@ -168,14 +169,14 @@ export class ClickableTile extends Component {
168169
);
169170

170171
return (
171-
<a
172+
<Link
172173
href={href}
173174
className={classes}
174175
{...other}
175176
onClick={this.handleClick}
176177
onKeyDown={this.handleKeyDown}>
177178
{children}
178-
</a>
179+
</Link>
179180
);
180181
}
181182
}

0 commit comments

Comments
 (0)