based upon https://www.innoq.com/en/blog/rails-frontend-components but adjusted to atomic design
The blogpost had the explicit concept of data that is checked for
a contract. In this approach it is optional. You can do it like
this:
Caller:
This is <%= atom :strong, data: { text: "good" } %>.Called:
<%
text = data.fetch(:text)
%>
<strong><%= text %></strong>This drops the concept of variant. I think it was not a good idea in hindsight.
This ignores JS and CSS, because it doesn't need to worry about it.
But the suggestion is to put them into the folders with the name
index.js and index.scss to make it easy to import them.
But this is left to tools like faucet.
aiur like documentation generator.
Should this be the aiur gem?
Maybe make the words atom, molecule etc. optional. This could work
by not including the helpers, only the component helper and only
generating the four helpers so it can be modified. Same for the
controller helper.