ruby-hyperloop.io icon indicating copy to clipboard operation
ruby-hyperloop.io copied to clipboard

Comp('data-foo-bar' => 12, 'data-baz-woggle' => "strng") can be shortened

Open catmando opened this issue 8 years ago • 0 comments

the following works with data and aria tags:

Comp('data-foo-bar' => 12, 'data-baz-woggle' => "strng") can be written as Comp(data: {foo_bar: 12, baz_woggle: "strng")

In otherwords data attributes can be provided as a hash, and snake case will be dasherized automatically.

Also works with aria attributes

catmando avatar Nov 01 '17 19:11 catmando