Skip to content
Browse files

Added class option to icon_tag to accept any custom classes you want …

…to throw at it.
  • Loading branch information...
1 parent 6126811 commit ff83912a7ac0cfb45a09f5a1e6ee63bef8da59e2 @joshuapinter committed
Showing with 4 additions and 1 deletion.
  1. +4 −1 bootstrap_helper.rb
View
5 bootstrap_helper.rb
@@ -20,7 +20,9 @@ module RailsBootstrapHelpers::BootstrapHelper
# with 'icon-' if not done already.
# @param [Hash] options
#
- # @option options [Boolean] white (false) Set to false if you want to use the black icon.
+ # @option options [Boolean] white (false) Set to true if you want a white icon.
+ # @option options [String] class ('') Set any classes you want for the icon here.
+ # a bit nicer.
#
# @return [HTML]
#
@@ -33,6 +35,7 @@ def icon_tag name, options = {}
klass = [name]
klass << 'icon-white' if options[:white]
+ klass << options[:class]
content_tag :i, nil, class: klass.join( ' ' )
end

0 comments on commit ff83912

Please sign in to comment.
Something went wrong with that request. Please try again.