Sha256: 1c3421e8ce2e30172cc59f9a83332bba21170d6e6e94c29803d01bbd4dbddb9b

Contents?: true

Size: 424 Bytes

Versions: 4

Compression:

Stored size: 424 Bytes

Contents

# frozen_string_literal: true

require "action_view/helpers" if defined?(Rails)

module Heroicons
  module Helper
    def heroicon(name, variant: Heroicons.config.variant, **attributes)
      icon = Heroicons::Icon.new(name: name,
                                 variant: variant,
                                 attributes: Heroicons.config.attributes[variant].merge(attributes))

      raw icon.render
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
heroicons-ruby-2.1.1 lib/heroicons/helper.rb
heroicons-ruby-2.1.0 lib/heroicons/helper.rb
heroicons-ruby-2.0.0 lib/heroicons/helper.rb
heroicons-ruby-2.0.0.pre.beta.1 lib/heroicons/helper.rb