Sha256: 763bb62f84539e1d9b74ccd77b4f37c92aa655210563963f0bbb19200c3afa3c

Contents?: true

Size: 302 Bytes

Versions: 31

Compression:

Stored size: 302 Bytes

Contents

module SemanticIconHelper
  def semantic_icon(*names)
    opts = names[-1].is_a?(Hash) ? names.delete_at(-1) : {}
    icon_classes = names.map{|name| "#{name.to_s.gsub('_','-')}" } << 'icon'
    opts[:class] = [opts[:class], icon_classes].flatten.reject(&:nil?)
    content_tag :i, nil, opts
  end
end

Version data entries

31 entries across 31 versions & 2 rubygems

Version Path
semantic-ui-sass-2.4.4.0 app/helpers/semantic_icon_helper.rb
semantic-ui-sass-2.4.3.0 app/helpers/semantic_icon_helper.rb
semantic-ui-sass-2.4.2.0 app/helpers/semantic_icon_helper.rb
fomantic-ui-sass-2.6.4 app/helpers/semantic_icon_helper.rb
semantic-ui-sass-2.4.0.1 app/helpers/semantic_icon_helper.rb
semantic-ui-sass-2.4.0.0 app/helpers/semantic_icon_helper.rb
semantic-ui-sass-2.3.1.2 app/helpers/semantic_icon_helper.rb
semantic-ui-sass-2.3.1.1 app/helpers/semantic_icon_helper.rb
semantic-ui-sass-2.3.1.0 app/helpers/semantic_icon_helper.rb
semantic-ui-sass-2.3.0.0 app/helpers/semantic_icon_helper.rb
semantic-ui-sass-2.2.14 app/helpers/semantic_icon_helper.rb
semantic-ui-sass-2.2.12.1 app/helpers/semantic_icon_helper.rb
semantic-ui-sass-2.2.12.0 app/helpers/semantic_icon_helper.rb
semantic-ui-sass-2.2.11.0 app/helpers/semantic_icon_helper.rb
semantic-ui-sass-2.2.10.1 app/helpers/semantic_icon_helper.rb
semantic-ui-sass-2.2.10.0 app/helpers/semantic_icon_helper.rb
semantic-ui-sass-2.2.9.3 app/helpers/semantic_icon_helper.rb
semantic-ui-sass-2.2.9.2 app/helpers/semantic_icon_helper.rb
semantic-ui-sass-2.2.9.1 app/helpers/semantic_icon_helper.rb
semantic-ui-sass-2.2.9.0 app/helpers/semantic_icon_helper.rb