class UiBibz::Ui::Ux::Containers::Components::PanelColumn

Create a panel column

Attributes

Options

You can add HTML attributes using the html_options. You can pass arguments in options attribute:

Examples

UiBibz::Ui::Core::Boxes::PanelColumn.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_column.rb, line 29
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_column.rb, line 39
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_column.rb, line 35
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_column.rb, line 45
def component_html_classes
  'panel-columns'
end