Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

Icon sizes that pull in different paths #1356

@codepretty

Description

@codepretty

Feature Request

We have a lot of icons that are made for particular sizes. Due to how SVGs scale, it is not always optimal to just use css for scaling sometimes a different icons is needed.

Problem description

We have the ability to set a size on an icon and adjust the size with css
<Icon name="chevron" size="small" />

But there are a number of icons that are designed to use a different SVG or paths for different sizes.

Proposed solution

The Icon API should remain the same, but if an icon has a smaller version (either new SVG or paths or ??) then it should use that. If not, then it should scale via css.

Use case

We need to add chevrons of different sizes. And instead of adding them as completely different assets SVGs with names like chevron-medium and chevron-small, it would be nice to let the person using the SVG just used the size prop to pull in the correct asset.

image

Metadata

Metadata

Labels

vstsPaired with ticket in vsts

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions