mi6 / mi6/ic-ui-kit

[ic-button] update target prop to add 'open in new window' icon

Open
#3,984 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
53
Forks
63
Avg merge
2d 4h
Merged PRs (30d)
15

Description

### Summary of the bug
When the target prop is used on `ic-link` the 'open in new window' icon is displayed when `target="_blank"`. When the target prop is used on `ic-button` it just works in the background, but we think it should also display the 'open in new window' icon.

### 🧐 Expected behaviour
The target prop on button should work the same as link (but only when `TagType` is an ``).

### Additional info
Please also add this prop to the button playground so we can see it working.

Contributor guide

Open the contributing guide

Research direction

Start at the ic-button implementation and compare its target handling with ic-link, noting the TagType="a" condition. Inspect the button playground entry to understand how target is exposed, then verify that target="_blank" shows the open-in-new-window icon only for the anchor variant.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.