Skip to content

Icons: Handling with Icons should be improved #4547

@JulianBu

Description

@JulianBu

Which generators are affected?

  • All
  • HTML
  • React
  • Angular
  • Vue
  • Web components
  • Power Apps

Reproduction case

We noticed some issues when using the Icons as foundations.

  1. Changing the variant to filled did not work on the Icon Information Circle. In your Showcase, it supports both variants. But setting it via:
    <DBIcon icon={"information_circle"} variant="filled" />
    This doesn't work. But setting it via the style props works.
    <DBIcon icon={"information_circle"} style={{ "--db-icon-font-family": "db-filled" }} />
  2. This is not a specific bug. It's more about the handling with the Icons. We would prefer specific props to change the variant, color and size of the Icon instead of manually changing its style. Currently, we are using the Icon like this:
<DBIcon
    icon={iconName}
    style={{
        "--db-icon-color": iconColor,
        "--db-icon-font-family": "db-filled",
        "--db-icon-font-size": "16px",
    }}
/>

Expected Behaviour

  1. Setting the variant should change to fill the given Icon.
  2. We expect the behavior like:
<DBIcon
    icon={"iconName"}
    color={"iconColor"}
    size={"size"} 
    variant={"filled"}
/>

Screenshots

No response

Browser version

Chrome

Add any other context about the problem here.

When there are specific props that can be passed into a component, it would be nice if there is an example and a list with the given props. Like in the components section of your showcase.

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    🕋 In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions