GovAlta / ui-components

ui-components contains the code you need to start building a user interface for Government of Alberta platforms and services.
Apache License 2.0
15 stars 25 forks source link

Text-link component #1809

Open twjeffery opened 6 months ago

twjeffery commented 6 months ago

We have a "text link" component in design, it seems like it may also be useful for development.

Use case:

image

Acceptance Criteria

  1. New goa-link component created
    • leadingIcon and trailingIcon properties
    • size property to determine icon and text size (and gap spacing)
    • slot for link inclusion
vanessatran-ddi commented 6 months ago

I am thinking if we can create/should create a new component such as goa-link It can be used as: <goa-link href="#" target="_blank" size="sm" icon="copy">Some text or even a slot</goa-link>

It can even have a leading icon, or trailing icon. Example is: image

Consider about accessibility, when href is there, we can add role according to this document https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attributes