Sha256: 3b995414bf5c952d816838ec759269720794efad95ffec3da01e878ee8d308b4

Contents?: true

Size: 467 Bytes

Versions: 1

Compression:

Stored size: 467 Bytes

Contents

module GlyphExtension

  # Render glyph and content html
  def glyph_and_content_html content_html = nil
    [glyph_with_space, content_html || content].compact.join.html_safe
  end

  # Render glyph with space html
  def glyph_with_space
    "#{ glyph } " unless glyph.nil?
  end

  # Render glyph html
  def glyph
    glyph_info = options[:glyph] if options.kind_of?(Hash)
    UiBibz::Ui::Core::Icons::Glyph.new(glyph_info).render unless glyph_info.nil?
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ui_bibz-2.0.0.beta2.6 lib/ui_bibz/ui/extensions/core/component/glyph_extension.rb