Sha256: 39cb931cd5172109d1edbc04fc70360989a827985db912404bc82240f7ddf4ee

Contents?: true

Size: 498 Bytes

Versions: 13

Compression:

Stored size: 498 Bytes

Contents

require_relative '../utils'

module Ustyle
  module Helpers
    module Icons
      def self.icon(name, size, color, role ='presentation', pseudo = false, classes = [])
        "
          <svg class='us-icon--#{name} us-icon--#{color} us-icon--#{size} #{pseudo ? "us-icon--#{pseudo}" : ""} #{classes.join(' ') unless classes.nil?}' role='#{role}' xmlns='http://www.w3.org/2000/svg'>
            <use xlink:href='/icons.svg#icon-#{name}'></use>
          </svg>
        "
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
reustyle-2.0.9 lib/ustyle/helpers/icon_helper.rb
reustyle-2.0.8 lib/ustyle/helpers/icon_helper.rb
reustyle-2.0.7 lib/ustyle/helpers/icon_helper.rb
ustyle-1.19.2 lib/ustyle/helpers/icon_helper.rb
ustyle-1.16.2 lib/ustyle/helpers/icon_helper.rb
ustyle-1.16.1 lib/ustyle/helpers/icon_helper.rb
ustyle-1.15.3 lib/ustyle/helpers/icon_helper.rb
ustyle-1.14.11 lib/ustyle/helpers/icon_helper.rb
ustyle-1.14.10 lib/ustyle/helpers/icon_helper.rb
ustyle-1.14.0 lib/ustyle/helpers/icon_helper.rb
ustyle-1.12.6 lib/ustyle/helpers/icon_helper.rb
ustyle-1.12.1 lib/ustyle/helpers/icon_helper.rb
ustyle-1.12.0 lib/ustyle/helpers/icon_helper.rb