komposable / komponent

An opinionated way of organizing front-end code in Ruby on Rails, based on components
http://komponent.io
MIT License
427 stars 31 forks source link

Problem with haml generated. #103

Closed descovi closed 6 years ago

descovi commented 6 years ago

Hi! Thanks for your great work and ideas.

When I generate a component with haml i get this

schermata 2018-07-20 alle 12 45 36

When with haml can be enough

.print-btn

or (if you want to be more verbose)

div{class: 'print-btn'}

Spone commented 6 years ago

Hi, thanks for reporting this.

I prepared a fix: #104

It will be part of the next release.

meneerprins commented 6 years ago

Could you also change the data attribute for Stimulus in HAML to:

.print-btn{ data: { controller: 'print' } }

descovi commented 6 years ago

@Spone thanks

+1 also for request of @meneerprins

Spone commented 6 years ago

Done: https://github.com/komposable/komponent/pull/104/commits/dff567186fb6bf6c97aac051398d029067e38231

Thanks for your feedback!