Sha256: 33173fe0f02db443688b2ebe68e4ded2f88fb3f68e8f33f42d955b5944639d9c

Contents?: true

Size: 895 Bytes

Versions: 10

Compression:

Stored size: 895 Bytes

Contents

# frozen_string_literal: true

module BootstrapLeather
  # Icons, i.e. tiny images from fonts
  module IconsHelper
    def icon(type)
      render(partial: 'bootstrap_leather/icons/icon', locals: { type: type })
    end

    def icon_button_to(button_class, icon_type, text, link, html_options = {})
      html_options[:class] = 'btn btn-' + button_class
      render(
        partial: 'bootstrap_leather/icons/icon_button_to',
        locals: {
          button_class: button_class, icon_type: icon_type, text: text,
          link: link, html_options: html_options
        }
      )
    end

    def icon_link_to(icon_type, text, link, html_options = {})
      render(
        partial: 'bootstrap_leather/icons/icon_link_to',
        locals: {
          icon_type: icon_type,
          text: text,
          link: link,
          html_options: html_options
        }
      )
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
bootstrap_leather-0.10.14 app/helpers/bootstrap_leather/icons_helper.rb
bootstrap_leather-0.10.13 app/helpers/bootstrap_leather/icons_helper.rb
bootstrap_leather-0.10.11 app/helpers/bootstrap_leather/icons_helper.rb
bootstrap_leather-0.10.10 app/helpers/bootstrap_leather/icons_helper.rb
bootstrap_leather-0.10.9 app/helpers/bootstrap_leather/icons_helper.rb
bootstrap_leather-0.10.8 app/helpers/bootstrap_leather/icons_helper.rb
bootstrap_leather-0.10.7 app/helpers/bootstrap_leather/icons_helper.rb
bootstrap_leather-0.10.6 app/helpers/bootstrap_leather/icons_helper.rb
bootstrap_leather-0.10.5 app/helpers/bootstrap_leather/icons_helper.rb
bootstrap_leather-0.10.4 app/helpers/bootstrap_leather/icons_helper.rb