Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
adrianthedev opened this issue May 24, 2023 · 3 comments
Open

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

adrianthedev opened this issue May 24, 2023 · 3 comments

Comments

@adrianthedev
Copy link

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 adrianthedev changed the title Are you open to a top-level class: attribute? [Proposal] Are you open to a top-level class: attribute? May 24, 2023
@adrianthedev
Copy link
Author

CC @bharget 👆

@wrystr
Copy link

wrystr commented Aug 2, 2023

+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: {}

@adrianthedev
Copy link
Author

friendly ping @bharget

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants