Module: Shoehorn::Helpers::IconHelpers
- Defined in:
- lib/shoehorn/helpers/icon_helpers.rb
Instance Method Summary collapse
-
#bootstrap_icon(options = {}) ⇒ Object
Renders icons.
Instance Method Details
#bootstrap_icon(options = {}) ⇒ Object
Renders icons
Examples
bootstrap_icon(name: 'user', icon_white: true)
# => '<i class="icon-user icon-white"></i>'
bootstrap_icon(text: "Current time", name: 'time')
# => '<i class="icon-time"></i> Current time'
bootstrap_icon(class: "my_awesome_class", name: 'glass')
# => '<i class="icon-glass my_awesome_class"></i>'
Returns HTML String for the icons
26 27 28 29 30 |
# File 'lib/shoehorn/helpers/icon_helpers.rb', line 26 def bootstrap_icon( = {}) Shoehorn::Components::Icon.new( ).to_s end |