Sha256: d164aa4e23f0b15e89e9a3d7ace6d546b5f4402978c6d54d2cf73af5462593eb
Contents?: true
Size: 1.43 KB
Versions: 23
Compression:
Stored size: 1.43 KB
Contents
module UiBibz::Ui::Core::Layouts # 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 # class Container < UiBibz::Ui::Core::Component # See UiBibz::Ui::Core::Component.initialize def initialize content = nil, options = nil, html_options = nil, &block super end # Render html tag def render content_tag :div, content, html_options end private def component_html_classes type end def type options[:type] == :fluid ? "container-fluid" : "container" end end end
Version data entries
23 entries across 23 versions & 1 rubygems