You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The static values declaration allows us to set default values so that we have the choice to accept the default value or pass in an override via data-attributes.
It would be great if the same were true for the static classes declaration. For libraries, this would allow us to set default class names but then users could override those defaults with data-attributes.
I use "visually-hidden" by default for anything I want to hide, and I expose this via static classes = ["hidden"]. But I'd love to not have to pass data-controller-name-hidden-class="visually-hidden" every single time I use the controller. I'd like to be able to pass it only when the value is something other than "visually-hidden".
The text was updated successfully, but these errors were encountered:
The
static values
declaration allows us to set default values so that we have the choice to accept the default value or pass in an override via data-attributes.It would be great if the same were true for the
static classes
declaration. For libraries, this would allow us to set default class names but then users could override those defaults with data-attributes.I use "visually-hidden" by default for anything I want to hide, and I expose this via
static classes = ["hidden"]
. But I'd love to not have to passdata-controller-name-hidden-class="visually-hidden"
every single time I use the controller. I'd like to be able to pass it only when the value is something other than "visually-hidden".The text was updated successfully, but these errors were encountered: