Class: TabComponent
- Defined in:
- app/components/tab_component.rb
Overview
Tab — tab navigation with content panes.
Usage:
Tab(active: true) { text "Tab pane content" }
Constant Summary
Constants inherited from Component
Instance Method Summary collapse
Methods inherited from Component
default, #initialize, #render_in, slot
Constructor Details
This class inherits a constructor from Component
Instance Method Details
#to_s ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'app/components/tab_component.rb', line 12 def to_s classes = class_names( "ui", { "active" => active }, "tab" ) data = { controller: "fui-tab" } data[:tab] = path if path tag.div(class: classes, data: data) { @content } end |