Skip to content

Add theme.anchor.icon.color #7198

@taysea

Description

@taysea

Expected Behavior

Should be able to define an icon color to be used by default in Anchors. I'd expect the logic to be:

  1. If the caller defines a color directly as prop on the icon, this color should apply.
  2. If the caller defines a color on the Anchor itself, this color should apply to the anchor text + icon (this is current behavior)
  3. If no color prop is used on Anchor or icon, then theme.anchor.icon.color should be applied to the icon.
  4. If theme.anchor.icon.color is not defined, then just apply the anchor color to icon (this is current behavior).

This will allow easier enforcement across applications of what currently is just guidance: https://github.com/grommet/grommet-theme-hpe/wiki/Migrating-from-HPE-Theme-4.x-to-5.x#updated-anchor-treatment

Actual Behavior

No ability to theme icon color.

URL, screen shot, or Codepen exhibiting the issue

Steps to Reproduce

Your Environment

  • Grommet version:
  • Browser Name and version:
  • Operating System and version (desktop or mobile):

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementA suggestion to add to or change behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions