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.
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 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 thename
parameter is a url. If it is, render animage
element, with thesrc
attribute set to the url. Otherwise, render the icon as usual.New feature implementation