Sha256: 01715ebb014ee2afcc74e8ce202cee479a8e3482858207dee1959855082acc82

Contents?: true

Size: 1.87 KB

Versions: 42

Compression:

Stored size: 1.87 KB

Contents

# frozen_string_literal: true

module UiBibz::Helpers::Ui::UxHelper
  # Table Component
  #
  # +options+ (Hash)
  # +html_options+ (Hash)
  #
  def ui_table(content = nil, options = nil, html_options = nil, &block)
    if tapped?(block)
      UiBibz::Ui::Ux::Tables::Table.new(content, options, html_options).tap(&block).render
    else
      UiBibz::Ui::Ux::Tables::Table.new(content, options, html_options, &block).render
    end
  end

  # Table Search Field Component
  #
  # +options+ (Hash) [Required]
  # +html_options+ (Hash)
  def ui_table_search_field(options, html_options = nil)
    UiBibz::Ui::Ux::Tables::TableSearchField.new(options, html_options).render
  end

  # Table Pagination Per Page Component
  #
  # +options+ (Hash) [Required]
  # +html_options+ (Hash)
  def ui_table_pagination_per_page(options, html_options = nil)
    UiBibz::Ui::Ux::Tables::TablePaginationPerPage.new(options, html_options).render
  end

  # Table Pagination Component
  #
  # +options+ (Hash) [Required]
  # +html_options+ (Hash)
  def ui_table_pagination(options, html_options = nil)
    UiBibz::Ui::Ux::Tables::TablePagination.new(options, html_options).render
  end

  # Glyph and Text method
  #
  # Merge glyph and text with html_safe
  def ui_glyph_and_text(glyph_args, text)
    "#{ui_glyph glyph_args} #{text}".html_safe
  end

  # Table Pagination Component
  #
  # +options+ (Hash) [Required]
  # +html_options+ (Hash)
  #
  def ui_table_card(content = nil, options = nil, html_options = nil, &block)
    if tapped?(block)
      UiBibz::Ui::Ux::Tables::TableCard.new(content, options, html_options).tap(&block).render
    else
      UiBibz::Ui::Ux::Tables::TableCard.new(content, options, html_options, &block).render
    end
  end

  def ui_panel(content = nil, options = nil, html_options = nil, &block)
    UiBibz::Ui::Ux::Containers::Panel.new(content, options, html_options).tap(&block).render
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
ui_bibz-3.0.13 lib/ui_bibz/helpers/ui/ux_helper.rb
ui_bibz-3.0.12 lib/ui_bibz/helpers/ui/ux_helper.rb
ui_bibz-3.0.11 lib/ui_bibz/helpers/ui/ux_helper.rb
ui_bibz-3.0.10 lib/ui_bibz/helpers/ui/ux_helper.rb
ui_bibz-3.0.9 lib/ui_bibz/helpers/ui/ux_helper.rb
ui_bibz-3.0.8 lib/ui_bibz/helpers/ui/ux_helper.rb
ui_bibz-3.0.7 lib/ui_bibz/helpers/ui/ux_helper.rb
ui_bibz-3.0.6 lib/ui_bibz/helpers/ui/ux_helper.rb
ui_bibz-3.0.5 lib/ui_bibz/helpers/ui/ux_helper.rb
ui_bibz-3.0.4 lib/ui_bibz/helpers/ui/ux_helper.rb
ui_bibz-3.0.3 lib/ui_bibz/helpers/ui/ux_helper.rb
ui_bibz-3.0.2 lib/ui_bibz/helpers/ui/ux_helper.rb
ui_bibz-3.0.1 lib/ui_bibz/helpers/ui/ux_helper.rb
ui_bibz-3.0.0 lib/ui_bibz/helpers/ui/ux_helper.rb
ui_bibz-3.0.0.beta19 lib/ui_bibz/helpers/ui/ux_helper.rb
ui_bibz-3.0.0.beta18 lib/ui_bibz/helpers/ui/ux_helper.rb
ui_bibz-3.0.0.beta17 lib/ui_bibz/helpers/ui/ux_helper.rb
ui_bibz-3.0.0.beta16 lib/ui_bibz/helpers/ui/ux_helper.rb
ui_bibz-3.0.0.beta15 lib/ui_bibz/helpers/ui/ux_helper.rb
ui_bibz-3.0.0.beta14 lib/ui_bibz/helpers/ui/ux_helper.rb