Skip to content

Support for SVG #77

@AMoreaux

Description

@AMoreaux

Describe the feature and the current behavior/state.

Today the ImageLike type doesn't support SVG.

My use case requires to display several colors from hex values in a search view.
I would like to be able to do that:

<List.Item
  icon='../../acme.svg'
  title={props.item.name}
/>

Or

<List.Item
  icon='data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg"><rect width="10" height="10" fill="#ffffff"/></svg>'
  title={props.item.name}
/>

Or

<List.Item
  icon=' data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IHdpZHRoPSIxMCIgaGVpZ2h0PSIxMCIgZmlsbD0iI2ZmOGUwNSIvPjwvc3ZnPic='
  title={props.item.name}
/>

Will this change the current api? How?

No breaking change.

Who will benefit with this feature?

Every developer who wants to use SVG to display an icon or create visual things programmatically.

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiIssues related to APIfeature requestNew feature or improvementstatus: fixed in next releaseThe issue will be closed once next release is available

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions