Sha256: eb830a81508d6bce7be24499fe38b509410dfb91cad294debb4c116b9318128a
Contents?: true
Size: 1.16 KB
Versions: 7
Compression:
Stored size: 1.16 KB
Contents
module UiBibz::Ui::Core::Layouts # Create a row # # 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+. # You can pass arguments in options attribute: # * +type+ - Symbol | :form # # ==== Signatures # # UiBibz::Ui::Core::Layouts::Row.new(content, options = {}, html_options = {}) # # UiBibz::Ui::Core::Layouts::Row.new(options = {}, html_options = {}) do # #content # end # # ==== Helper # # row(content, options = {}, html_options = {}) # # row(options = {}, html_options = {}) do # content # end # class Row < 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 options[:type] == :form ? 'form-row' : 'row' end end end
Version data entries
7 entries across 7 versions & 1 rubygems