class NfgUi::Bootstrap::Components::TabPane

Bootstrap Progress Component getbootstrap.com/docs/4.1/components/progress/

Public Instance Methods

component_family() click to toggle source
# File lib/nfg_ui/bootstrap/components/tab_pane.rb, line 11
def component_family
  :tab
end
fade() click to toggle source

Fade is turned on by default This should probably be a global setting

# File lib/nfg_ui/bootstrap/components/tab_pane.rb, line 25
def fade
  options.fetch(:fade, true)
end
id() click to toggle source
Calls superclass method NfgUi::Bootstrap::Components::Base#id
# File lib/nfg_ui/bootstrap/components/tab_pane.rb, line 19
def id
  tab ? tab.tr('#', '') : super
end
tab() click to toggle source
# File lib/nfg_ui/bootstrap/components/tab_pane.rb, line 15
def tab
  options.fetch(:tab, nil)
end

Private Instance Methods

assistive_html_attributes() click to toggle source
# File lib/nfg_ui/bootstrap/components/tab_pane.rb, line 43
def assistive_html_attributes
  { role: 'tabpanel' }
end
css_classes() click to toggle source
# File lib/nfg_ui/bootstrap/components/tab_pane.rb, line 31
def css_classes
  [
    super,
    ('fade' if fade),
    ('show' if active)
  ].join(' ').squish
end
non_html_attribute_options() click to toggle source
# File lib/nfg_ui/bootstrap/components/tab_pane.rb, line 39
def non_html_attribute_options
  super.push(:tab)
end