Class: Nav::TabPanels::TabComponent
- Inherits:
-
ItemComponent
- Object
- ItemComponent
- Nav::TabPanels::TabComponent
- Defined in:
- app/components/spark/nav/tab_panels/tab_component.rb
Instance Method Summary collapse
Instance Method Details
#before_render ⇒ Object
4 5 6 7 8 |
# File 'app/components/spark/nav/tab_panels/tab_component.rb', line 4 def before_render aria_attr controls: parent.tag_attrs[:id], selected: !!active data_attr anchor: href, add_class: "active" add_class "active" if active end |
#render ⇒ Object
10 11 12 |
# File 'app/components/spark/nav/tab_panels/tab_component.rb', line 10 def render content_tag(:li, id: parent.tab_wrapper_id, class: "nav-tab-wrapper #{active ? "active" : nil}") { super } end |