class UiBibz::Ui::Core::Navigations::NavbarText
Create a NavbarText
Attributes¶ ↑
-
content
- Content of element -
options
- Options of element -
html_options
- Html Options of element
Options¶ ↑
You can add HTML attributes using the html_options
. You can pass arguments in options attribute:
-
position
- Symbol (:right
,:left
)
Signatures¶ ↑
UiBibz::Ui::Core::Navigations::NavbarText.new(content, options = nil, html_options = nil) UiBibz::Ui::Core::Navigations::NavbarText.new(options = nil, html_options = nil) do content end
Examples¶ ↑
UiBibz::Ui::Core::Navigations::NavbarText.new('Exemple).render UiBibz::Ui::Core::Navigations::NavbarText.new(position: :right) do 'Exemple' end.render
Public Instance Methods
pre_render()
click to toggle source
Render html tag
# File lib/ui_bibz/ui/core/navigations/components/navbar_text.rb, line 39 def pre_render content_tag :span, content, html_options end
Private Instance Methods
component_html_classes()
click to toggle source
# File lib/ui_bibz/ui/core/navigations/components/navbar_text.rb, line 45 def component_html_classes ['navbar-text', position] end
position()
click to toggle source
# File lib/ui_bibz/ui/core/navigations/components/navbar_text.rb, line 49 def position "navbar-#{options[:position]}" unless options[:position].nil? end