lucca-front
lucca-front copied to clipboard
[icon] add unicode input
Problem
In some projects, there's a need for icons before they are effectively added to LF, or the project in question is a bit late on the library's version but it requires an icon that has been added in a newer one (for instance project uses 17.2 but requires an icon added in 17.3).
Technically, the icon is available, since it being available means that it's in the font that's in our CDN. In order to use it, one would have to add a icon-XXX
class in their shame.scss
and give it a content:
property with the icon's unicode as value.
Proposal
- Make
icon
input either optional or give it a possible value that would be something likeUnicode
(PascalCase here to make sure we don't conflict with an actual icon name). - Add a
unicode
input where we expect just the unicode value that should be applied to the icon to get the brand new icon without needing anything fromshame.scss
.
Bonus
A nice bonus could be to have an eslint rule triggering on lu-icon
that have a unicode, to be able to easily update them when the library has been updated enough to have the icon in typings.