basicons 1.0.4 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c4317dc2b0ca155bcf56df5a880671797227047b9a98724055b81020a4197005
4
- data.tar.gz: edbb025d188fafb1fbd28544e3524dbf8f86e0b745c5b578451d6dcb285785a5
3
+ metadata.gz: c941b7ca0d5faa006dddca3854205f3844687247a806ca801bf8308cb85a7b12
4
+ data.tar.gz: 8c69ebfbb8dd9556b544ca388b78ebb25aee0c040ce3a23f2ba12f3cccf48c01
5
5
  SHA512:
6
- metadata.gz: 4970bbc6a983d3518846be9f62389b8c5a70d97d27c9ab0b61f77d6d0febf4aadabfc914f50896899054a9d9444700d5637827b3adb9e9b797be1797c4ff815b
7
- data.tar.gz: 2e32747044ff27e880dc13e7dac92f56341d20726496de5890c53d3c77bc0b7474608c380ed2afbdd85b89739ded7aa6e8657910d7832a9f8f7e3435d78f35ab
6
+ metadata.gz: 925df0343ff1489f6d8f089a9a36f8945fb89f34495b9f330f0b0027b422efb695ede57dfc7aa9b4350452dfe40d80528b9d3cae8b6c2c1c07e572a6e4606fdf
7
+ data.tar.gz: 7e3266dfe853e1f611327c32915babdf09945d0c6e0c9700c41450cf16956b61039e2b60ed1c3de93f5ff7037eacde16518122f8a62c68a28e17f08cc4527f28
data/lib/assets/data.json CHANGED
@@ -319,4 +319,4 @@
319
319
  "media-film-video-alt": "<path d=\"M2 17H22M2 7H22M7 2V7M7 17V22M12 2V7M12 17V22M17 2V7M17 17V22M4 22H20C21.1046 22 22 21.1046 22 20V4C22 2.89543 21.1046 2 20 2H4C2.89543 2 2 2.89543 2 4V20C2 21.1046 2.89543 22 4 22ZM11 10.5V13.5L13.5 12L11 10.5Z\" />",
320
320
  "globe-world-earth": "<circle cx=\"12\" cy=\"12\" r=\"10\" /><path d=\"M3 12H22\" /><path d=\"M12 2.2019C14.4744 4.72698 16 8.18526 16 11.9999C16 15.8145 14.4744 19.2728 12 21.7978\" /><path d=\"M12 2.2019C9.52563 4.72698 8 8.18526 8 11.9999C8 15.8145 9.52563 19.2728 12 21.7978\" />",
321
321
  "coffee-tea-cup": "<path d=\"M17 6H17.9098C19.6165 6 21 7.38352 21 9.09017C21 10.2606 20.3387 11.3307 19.2918 11.8541L17 13.5M3 3V18C3 19.6569 4.34315 21 6 21H14C15.6569 21 17 19.6569 17 18V3H3Z\" />"
322
- }
322
+ }
@@ -1,5 +1,11 @@
1
1
  module Basicons
2
2
  class Basicon
3
+ SVG_SIZES = {
4
+ small: 16,
5
+ medium: 32,
6
+ large: 64
7
+ }.freeze
8
+
3
9
  attr_reader :data, :size
4
10
  attr_reader :symbol, :options
5
11
 
@@ -17,6 +23,7 @@ module Basicons
17
23
  fill: 'none'
18
24
  })
19
25
 
26
+ @options.delete(:size)
20
27
  @options['stroke-width'] = 2
21
28
  @options['stroke-linecap'] = 'round'
22
29
  @options['stroke-linejoin'] = 'round'
@@ -39,8 +46,15 @@ module Basicons
39
46
 
40
47
  def svg_size
41
48
  return @size unless @size.nil?
49
+
42
50
  @size = @options[:size].to_i
43
- @size = 16 if @size.zero?
51
+ value = @options[:size].to_s
52
+
53
+ if value.match?(/small|medium|large/)
54
+ @size = SVG_SIZES[value.to_sym]
55
+ end
56
+
57
+ @size = 24 if @size.zero?
44
58
  @size
45
59
  end
46
60
 
@@ -1,3 +1,3 @@
1
1
  module Basicons
2
- VERSION = '1.0.4'.freeze
2
+ VERSION = '1.0.6'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: basicons
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Basicons Team