Module: BreezeIconsRails::Rails::ViewHelpers

Defined in:
lib/breeze_icons_rails/rails/helpers.rb

Overview

add bi_icon helper

Instance Method Summary collapse

Instance Method Details

#bi_icon(name, html_options = {}) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/breeze_icons_rails/rails/helpers.rb', line 7

def bi_icon(name, html_options = {})
  content_class = "bi bi-#{name}"
  content_class << " #{html_options[:class]}" if html_options.key?(:class)
  html_options[:class] = content_class
  html_options["aria-hidden"] ||= true

  (:i, nil, html_options)
end