ic-ui-kit icon indicating copy to clipboard operation
ic-ui-kit copied to clipboard

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

Open GCHQ-Developer-530 opened this issue 3 months ago • 2 comments

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 <a>).

Additional info

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

GCHQ-Developer-530 avatar Sep 29 '25 09:09 GCHQ-Developer-530

Why is this in design to do? If a button is to open in a new window, the designer can use button with icon displayed on the right and assign 'open in new window' icon to the button.

Not sure what we need to do as design here.

mi6-577 avatar Oct 10 '25 08:10 mi6-577

I think in triage we were wondering what happens if someone wants an icon button or a button with the icon on the right, and for it to open in a new window e.g. can the button have 2 icons next to each other? Or should we restrict it so icons on the right don't show if the 'open in new window' icon needs to be shown?

GCHQ-Developer-530 avatar Oct 10 '25 08:10 GCHQ-Developer-530