Class: UI::TabsListComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- UI::TabsListComponent
- Includes:
- TabsListBehavior
- Defined in:
- app/view_components/ui/tabs_list_component.rb
Overview
TabsList component (ViewComponent) Container for tab trigger buttons
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(orientation: "horizontal", classes: "", attributes: {}) ⇒ TabsListComponent
constructor
A new instance of TabsListComponent.
Methods included from TabsListBehavior
Constructor Details
#initialize(orientation: "horizontal", classes: "", attributes: {}) ⇒ TabsListComponent
Returns a new instance of TabsListComponent.
17 18 19 20 21 |
# File 'app/view_components/ui/tabs_list_component.rb', line 17 def initialize(orientation: "horizontal", classes: "", attributes: {}) @orientation = orientation @classes = classes @attributes = attributes end |
Instance Method Details
#call ⇒ Object
23 24 25 26 27 28 29 |
# File 'app/view_components/ui/tabs_list_component.rb', line 23 def call attrs = list_html_attributes content_tag :div, **attrs.merge(@attributes) do content end end |