class UiBibz::Ui::Core::Layouts::Container
Create a Container
This element is an extend of UiBibz::Ui::Core::Component
.
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
.
-
type
- Symbol (:fluid)
Signatures¶ ↑
UiBibz::Ui::Core::Layouts::Container.new(content, options = nil, html_options = nil) UiBibz::Ui::Core::Layouts::Container.new(options = nil, html_options = nil) do content end
Examples¶ ↑
UiBibz::Ui::Core::Layouts::Container.new(content, { type: :fluid },{ class: 'test' }).render UiBibz::Ui::Core::Layouts::Container.new({ class: 'test' }) do content end.render
Helper¶ ↑
container(content, options = {}, html_options = {}) container(options = {}, html_options = {}) do content end
Public Instance Methods
pre_render()
click to toggle source
Render html tag
# File lib/ui_bibz/ui/core/layouts/container.rb, line 47 def pre_render content_tag :div, content, html_options end
Private Instance Methods
component_html_classes()
click to toggle source
# File lib/ui_bibz/ui/core/layouts/container.rb, line 53 def component_html_classes klass_name end
klass_name()
click to toggle source
# File lib/ui_bibz/ui/core/layouts/container.rb, line 57 def klass_name if options[:type] == :fluid 'container-fluid' elsif options[:size] "container-#{options[:size]}" else 'container' end end