Module: Primer::TabNavHelper
- Extended by:
- ActiveSupport::Concern
- Included in:
- Alpha::TabNav, Alpha::TabPanels
- Defined in:
- app/lib/primer/tab_nav_helper.rb
Overview
Helper to share tab validation logic between components. The component will raise an error if there are 0 or 2+ selected tabs.
Constant Summary collapse
- EXTRA_ALIGN_DEFAULT =
:left
- EXTRA_ALIGN_OPTIONS =
[EXTRA_ALIGN_DEFAULT, :right].freeze
Instance Method Summary collapse
- #tab_nav_body_classes(classes) ⇒ Object
- #tab_nav_classes(classes) ⇒ Object
- #tab_nav_tab_classes(classes) ⇒ Object
Instance Method Details
#tab_nav_body_classes(classes) ⇒ Object
28 29 30 31 32 33 |
# File 'app/lib/primer/tab_nav_helper.rb', line 28 def tab_nav_body_classes(classes) class_names( "tabnav-tabs", classes ) end |
#tab_nav_classes(classes) ⇒ Object
21 22 23 24 25 26 |
# File 'app/lib/primer/tab_nav_helper.rb', line 21 def tab_nav_classes(classes) class_names( "tabnav", classes ) end |
#tab_nav_tab_classes(classes) ⇒ Object
14 15 16 17 18 19 |
# File 'app/lib/primer/tab_nav_helper.rb', line 14 def tab_nav_tab_classes(classes) class_names( "tabnav-tab", classes ) end |