Module: Anyicon::Rails::IconHelper

Defined in:
app/helpers/anyicon/rails/icon_helper.rb

Instance Method Summary collapse

Instance Method Details

#anyicon(icon:, **props) ⇒ String

Renders an icon using the Anyicon gem.

Parameters:

  • icon (String)

    the name of the icon in the format ‘collection:icon_name’

  • props (Hash)

    additional properties to apply to the SVG element

Returns:

  • (String)

    the rendered SVG icon



11
12
13
# File 'app/helpers/anyicon/rails/icon_helper.rb', line 11

def anyicon(icon:, **props)
  Anyicon::Icon.render(icon:, **props)
end