PreviewGroup
Represents a group of examples within a preview.
Attributes
.label | Label for the group, used in navigation |
.url_path | URL of the group in Lookbook |
.type | The entity type. Returns |
Methods
.tags
Returns an array of Tag objects for the group
Groups cannot have tags set on themselves directly so the tags are the result of merging the tags of all examples in the group together.
If no tag type is provided then all tags are returned.
group.tags(<tag_type?>)
<tag_type?> | Optional tag type to filter by - e.g. |
<ul id="todo-list">
<% group.tags(:todo).each do |todo| %>
<li><%= todo.task %></li>
<% end %>
</ul>