class UiBibz::Ui::Ux::Containers::Components::PanelGroup
Create a panel group
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:
UiBibz::Ui::Core::Boxes::PanelGroup.new do |cg| cg.panel 'Exemple 1' cg.panel 'Exemple 2' cg.panel 'Exemple 3' end.render
Public Class Methods
new(content = nil, options = nil, html_options = nil, &block)
click to toggle source
See UiBibz::Ui::Core::Component.initialize
Calls superclass method
UiBibz::Ui::Core::Component::new
# File lib/ui_bibz/ui/ux/containers/components/panel_group.rb, line 27 def initialize(content = nil, options = nil, html_options = nil, &block) super @items = [] end
Public Instance Methods
panel(content = nil, options = nil, html_options = nil, &block)
click to toggle source
# File lib/ui_bibz/ui/ux/containers/components/panel_group.rb, line 37 def panel(content = nil, options = nil, html_options = nil, &block) @items << UiBibz::Ui::Ux::Containers::Panel.new(content, options, html_options).tap(&block).render end
pre_render()
click to toggle source
Render html tag
# File lib/ui_bibz/ui/ux/containers/components/panel_group.rb, line 33 def pre_render content_tag :div, @items.join.html_safe, html_options end
Private Instance Methods
component_html_classes()
click to toggle source
# File lib/ui_bibz/ui/ux/containers/components/panel_group.rb, line 43 def component_html_classes 'panel-group' end