Lundalogik / lime-elements

Provides reusable web components for Lime CRM
https://lundalogik.github.io/lime-elements/versions/latest
Other
38 stars 12 forks source link

limel-icon: add support for displaying an image by supplying a url #2874

Closed adrianschmidt closed 3 months ago

adrianschmidt commented 4 months ago

New feature motivation

There are loads of places in our existing components where it would be nice to be able to show an image, for example a user avatar. What these places have in common is that most, if not all, already support showing an icon, via limel-icon. By adding support for rendering an image element with a supplied url to limel-icon, we would get support from showing images in all these places, at a very low cost.

Re: https://github.com/Lundalogik/hack-tuesday/issues/345

New feature description

Let limel-icon detect if the string supplied as the name parameter is a url. If it is, render an image element, with the src attribute set to the url. Otherwise, render the icon as usual.

New feature implementation

adrianschmidt commented 3 months ago

I guess this issue was vetoed in the PR discussion, so I'll close this.