Sha256: d011cdcb6fbfa2f1aca4a095e9010d37468242039e45f7ed59769ecd8d08f42f

Contents?: true

Size: 303 Bytes

Versions: 24

Compression:

Stored size: 303 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.tr('_', '-').to_s } << 'icon'
    opts[:class] = [opts[:class], icon_classes].flatten.reject(&:nil?)
    content_tag :i, nil, opts
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
fomantic-ui-sass-2.9.3 app/helpers/semantic_icon_helper.rb
fomantic-ui-sass-2.9.2 app/helpers/semantic_icon_helper.rb
fomantic-ui-sass-2.9.1 app/helpers/semantic_icon_helper.rb
fomantic-ui-sass-2.9.0 app/helpers/semantic_icon_helper.rb
fomantic-ui-sass-2.8.8.1 app/helpers/semantic_icon_helper.rb
fomantic-ui-sass-2.8.8 app/helpers/semantic_icon_helper.rb
fomantic-ui-sass-2.8.7.1 app/helpers/semantic_icon_helper.rb
fomantic-ui-sass-2.8.7 app/helpers/semantic_icon_helper.rb
fomantic-ui-sass-2.8.6 app/helpers/semantic_icon_helper.rb
fomantic-ui-sass-2.8.5 app/helpers/semantic_icon_helper.rb
fomantic-ui-sass-2.8.4 app/helpers/semantic_icon_helper.rb
fomantic-ui-sass-2.8.3 app/helpers/semantic_icon_helper.rb
fomantic-ui-sass-2.8.2 app/helpers/semantic_icon_helper.rb
fomantic-ui-sass-2.8.1.1 app/helpers/semantic_icon_helper.rb
fomantic-ui-sass-2.8.1 app/helpers/semantic_icon_helper.rb
fomantic-ui-sass-2.7.8 app/helpers/semantic_icon_helper.rb
fomantic-ui-sass-2.7.7 app/helpers/semantic_icon_helper.rb
fomantic-ui-sass-2.7.6 app/helpers/semantic_icon_helper.rb
fomantic-ui-sass-2.7.5 app/helpers/semantic_icon_helper.rb
fomantic-ui-sass-2.7.4 app/helpers/semantic_icon_helper.rb