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
Hey there, view component community! I'm the author of the polymorphic slots feature that we're thinking of including by default in ViewComponent::Base. Here's a quick example copy/pasted from the docs:
<%= render ListItemComponent.new do |c| %> <% c.with_visual_avatar(src: "http://some-site.com/my_avatar.jpg", alt: "username") do %>
Profile
<% end >
<% end %><%= render ListItemComponent.new do |c| %> <% c.with_visual_icon(icon: :key) do %>
Security Settings
<% end >
<% end %>
How you can help!
Before we include the polymorphic slots behavior by default in ViewComponent::Base, I'd like to solicit feedback from the community. Is this a feature you've used, and if so, did it work the way you expected?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Summary
Hey there, view component community! I'm the author of the polymorphic slots feature that we're thinking of including by default in
ViewComponent::Base
. Here's a quick example copy/pasted from the docs:The slots can be defined in a template like so:
How you can help!
Before we include the polymorphic slots behavior by default in
ViewComponent::Base
, I'd like to solicit feedback from the community. Is this a feature you've used, and if so, did it work the way you expected?Beta Was this translation helpful? Give feedback.
All reactions