You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The README describes that elements can also be initialized via the components attributes Hash.
Seems like this feature is not working properly (or missing?).
see README
Another good use case is a navigation component:
# app/components/navigation_component.rb %>
class NavigationComponent < ElementalComponents::Component
element :items, multiple: true do
attribute :label
attribute :url
attribute :active, default: false
end
end
An alternative here is to pass a data structure to the component as an attribute, if no HTML needs to be injected when rendering the component:
<%= component "navigation", items: items %>
I already prepared a PR to make it work - or am I overseening sth. here?
The text was updated successfully, but these errors were encountered:
The README describes that elements can also be initialized via the components attributes Hash.
Seems like this feature is not working properly (or missing?).
see README
I already prepared a PR to make it work - or am I overseening sth. here?
The text was updated successfully, but these errors were encountered: