ruby-hyperloop / ruby-hyperloop.io

The project has moved to Hyperstack!! - Ruby Hyperloop Website and Documentation
https://hyperstack.org/
22 stars 18 forks source link

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

Open catmando opened 6 years ago

catmando commented 6 years ago

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