Skip to content

Commit 41db805

Browse files
committed
feat(clickable-tile): Add support for target attribute
1 parent 7c621ea commit 41db805

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/tiles/clickable-tile.component.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import {
3030
(click)="onClick($event)"
3131
(keydown)="onKeyDown($event)"
3232
[href]="href"
33+
[target]="target"
3334
[attr.aria-disabled]="disabled">
3435
<ng-content></ng-content>
3536
</a>`
@@ -42,6 +43,13 @@ export class ClickableTile {
4243
*/
4344
@Input() href: string;
4445

46+
/**
47+
* Sets the `target` attribute on the `ibm-clickable-tile` element.
48+
* @type {string}
49+
* @memberof ClickableTile
50+
*/
51+
@Input() target: string;
52+
4553
/**
4654
* Set to `true` to disable the clickable tile.
4755
* @type {boolean}

src/tiles/tiles.stories.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ storiesOf("Tiles", module)
3636
}))
3737
.add("Clickable", () => ({
3838
template: `
39-
<ibm-clickable-tile href="#">
40-
clickable tile content goes here...
39+
<ibm-clickable-tile href="https://www.carbondesignsystem.com/" target="_blank">
40+
Click the tile to open the Carbon Design System
4141
</ibm-clickable-tile>
4242
`
4343
}));

0 commit comments

Comments
 (0)