Module: RailsuiIcon::Helpers
- Includes:
- ActionView::Helpers::AssetUrlHelper
- Defined in:
- lib/railsui_icon/helpers.rb
Instance Method Summary collapse
Instance Method Details
#icon(name, options = {}) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/railsui_icon/helpers.rb', line 7 def icon(name, = {}) [:variant] ||= :outline [:class] = .fetch(:class, nil) custom_path = resolve_custom_path([:custom_path]) result = RailsuiIcon::Icon.render(name: name, variant: [:variant], options: , custom_path: custom_path) result.html_safe end |