Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: Link with paired icon, ability to position icon to the left of the Link text #17246

Closed
1 task done
adamlsmith981 opened this issue Aug 22, 2024 · 3 comments

Comments

@adamlsmith981
Copy link

The problem

Hi there, I was wondering if it was possible to enhance the Link component to be able to be paired with an Icon which renders to the left of the text. At the moment it only seems that renderIcon is only able to render to the right of the text
image

The solution

I would like there to be an option to do this:
image

This could be done by adding an optional prop that would trigger the icon to get rendered to the left hand side of the text link. Default could be left to the right so current implementations are not affected by the change.

Examples

No response

Application/PAL

No response

Business priority

Low Priority = release date is not dependent on fix or not upcoming

Available extra resources

No response

Code of Conduct

@adamlsmith981
Copy link
Author

If allowed and accepted as a reasonable enhancement, I would be more than happy to contribute a solution :)

@alisonjoseph
Copy link
Member

Tagging @carbon-design-system/design to get their thoughts on this.

@alina-jacob
Copy link
Member

Hi there @adamlsmith981, thanks for suggesting this issue
Carbon fundamentally follows Flush left alignment for text, if an Icon is introduced before the text, the text would appear indented, which is why we do not allow the icon to appear before the text.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

4 participants