airbnb / hypernova-ruby

Ruby client for Hypernova.
https://github.com/airbnb/hypernova
MIT License
141 stars 55 forks source link

Support custom tag #13

Open frozenfung opened 7 years ago

frozenfung commented 7 years ago

Hi, team

Is there any chance that we can support custom tag for wrapper here? Yeah, I have to admit that div is fascinating and able to fit more than 95% cases, but what just happen is like below:

I need to server-render an component and previously wrapped in a span tag. And I implement hypernova and its cool helper method(Ruby on Rails based), after a while it succeed without doubt. However, because of the tag being switched from div to span, my layout looks like a disaster. Finally I have to reluctantly make some adjustment with my stylesheet and html structure, well, not so much, but you know.

Can you guys give me some advices on this topic? Or just let me know that I could submit a PR for this.

thanks man.

goatslacker commented 7 years ago

Yeah sure this should be configurable.

ljharb commented 7 years ago

configurable to an allowed list of tag names, perhaps :-)