Problem/Motivation

On most projects we have a pattern where links have associated icons before and after text labels, or that the icons replace the text labels. We should use a standard component for this that we pass things into. Typically I'll do this and then make sure all menus use this same pattern so markup is standardized.

Issue fork prototype-3555290

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jnettik created an issue. See original summary.

jnettik’s picture

Status: Active » Needs review

This creates the new component. It has two custom properties that will allow components that leverage it to change the alignment of the text/icon pairs as well as adjust the spacing between them. It also assumes the icon is a raw SVG file and sets the color of it the same as the text so it inherits a parent's color style.

jldust’s picture

Assigned: Unassigned » jldust

Notes from 21st - Move into 02-components folder, review/remove existing icon from elements

  • jldust committed 25f19b4a on 5.x authored by jnettik
    feat: #3555290 Create an Icon Label component
    
    By: jnettik
    By: jldust
    
jldust’s picture

Status: Needs review » Reviewed & tested by the community

These changes have been merged in and will be included in the next tagged release.

jldust’s picture

Status: Reviewed & tested by the community » Fixed

This has been included in the most recent release

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

jldust’s picture

Status: Fixed » Closed (fixed)