DAB0mB / Appfairy

A CLI tool to Migrate a Webflow project into a React app
MIT License
286 stars 39 forks source link

Reusable components & content mapping #13

Open oalexdoda opened 5 years ago

oalexdoda commented 5 years ago

Is it possible to assign "af-el" to multiple elements with the same class to make them act as a singular component and have content mapped so that the components render content as well?

Currently, it renders something like this:

<div>
    <MenuLinkView.Controller />
    <MenuLinkView.Controller />
    <MenuLinkView.Controller />
    <MenuLinkView.Controller />
</div>

And the intended behavior would be something like this

<nav>
    <MenuLinkView.Controller label="Home" />
    <MenuLinkView.Controller label="Features" />
    <MenuLinkView.Controller label="Pricing" />
    <MenuLinkView.Controller label="Contact" />
</nav>

Also, since we're using BEM, classes are pretty well named, but it looks like Appfairy renames all classes. Any way to make certain classes preserve their original name? e.g. if they start with a prefix, such as abr-c- in our case:

Original class: abr-c-menu__dropdown Appfairy class: af-class-abr-c-menu__dropdown

Any thoughts? @DAB0mB

Thanks! Alex