heroicon icon indicating copy to clipboard operation
heroicon copied to clipboard

[Proposal] Are you open to a top-level `class:` attribute?

Open adrianthedev opened this issue 1 year ago • 3 comments

Hey 👋

Thanks for the wonderful gem. I used inline_svg a lot and one thing that this is different from that (and from regular Rails tag helpers) is that the class option is nested inside the options ... option.

Would you be open to a PR that would add the class attribute top-level? That would make it more inline with all the Rails tag helpers.

Thanks!

# Present
heroicon "map-pin", options: {class: "h-4"}

# Proposed API
heroicon "map-pin", class: "h-4"

adrianthedev avatar May 24 '23 19:05 adrianthedev

CC @bharget 👆

adrianthedev avatar Jun 08 '23 20:06 adrianthedev

+1

since I also can put stroke-width like this:

heroicon "map-pin", options: { class: "h-5 w-5", stroke_width: 2 }

There's no point of having both options: {} and path_options: {}

wrystr avatar Aug 02 '23 13:08 wrystr

friendly ping @bharget

adrianthedev avatar Oct 13 '23 13:10 adrianthedev