-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
Handle Stimulus CSS Classes #191
Conversation
Hi @weaverryan, would you mind reviewing this PR soon? I'd love to use this feature in my projects. Thanks :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good - can you just tweak that one part in the docs?
See [stimulus-bridge](https://github.com/symfony/stimulus-bridge) for more details. | ||
|
||
For example: | ||
|
||
```twig | ||
<div {{ stimulus_controller('chart', { 'name': 'Likes', 'data': [1, 2, 3, 4] }) }}> | ||
<div {{ stimulus_controller('chart', { 'name': 'Likes', 'data': [1, 2, 3, 4] }, { 'loading': 'spinner' }) }}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should leave this example alone, then add a 2nd example below. The reason is that this might make it look like passing CSS values is required or important, whereas in most cases, it wouldn't be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review :)
I moved it into a separate example, with & without values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I'll merge and then we'll make sure tests are passing now that you've fixed them :)
6d045b6
to
6a3b1d4
Compare
Thanks @jmsche! |
Closes #123.
This PR aims to add support for Stimulus CSS Classes (see https://stimulus.hotwired.dev/reference/css-classes).