lucca-front icon indicating copy to clipboard operation
lucca-front copied to clipboard

[icon] add unicode input

Open Supamiu opened this issue 10 months ago • 2 comments

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 like Unicode (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 from shame.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.

Supamiu avatar Apr 15 '24 14:04 Supamiu