class UiBibz::Ui::Core::Forms::Dropdowns::Components::DropdownHeader

Create DropdownHeader

This element is an extend of UiBibz::Ui::Core::Component. Use '—' in content to add a separator

Attributes

Options

You can add HTML attributes using the html_options.

Signatures

UiBibz::Ui::Core::Forms::DropdownHeader.new(content, options = nil, html_options = nil)

UiBibz::Ui::Core::Forms::DropdownHeader.new(options = nil, html_options = nil) do
  content
end

Examples

UiBibz::Ui::Core::Forms::DropdownHeader.new('Home',{ class: 'test' }).render

UiBibz::Ui::Core::Forms::DropdownHeader.new({ class: 'test' }) do
  'Home'
end.render

Public Instance Methods

pre_render() click to toggle source

Render html tag

# File lib/ui_bibz/ui/core/forms/dropdowns/components/dropdown_header.rb, line 39
def pre_render
  content_tag :h6, glyph_and_content_html, html_options
end

Private Instance Methods

component_html_classes() click to toggle source
# File lib/ui_bibz/ui/core/forms/dropdowns/components/dropdown_header.rb, line 45
def component_html_classes
  'dropdown-header'
end
component_html_options() click to toggle source
# File lib/ui_bibz/ui/core/forms/dropdowns/components/dropdown_header.rb, line 49
def component_html_options
  { role: 'presentation' }
end