heroicon 0.2.3 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: db57ef463b4b05e62a0103fefc25b38ef9d850bab4b0953e6a6c4adefe678414
4
- data.tar.gz: a52d71b83c7898d9b47cb8354224a625375fdf3f4f20bde7248f0b0e5b42d1ad
3
+ metadata.gz: 3d5ce70d82b7a63366314de5b26135a0e9e12a2def71059104ff094eed1f9dd7
4
+ data.tar.gz: e170e3883881e592130b588e4e6db9f03bf355db5156b4388aa15ecbb1cc8652
5
5
  SHA512:
6
- metadata.gz: f215ea1412e018c9f4837e90508ae29b6bd78fbbd16d25534c213a2c262528e4f5d0463af9ad32df9ae0d8414697d6315e245da21a0558b4fff11724139b7654
7
- data.tar.gz: 81a8647014c24b5a2f5e17c33acaa60cd64fb62f0cd310f5ac25fbdc09e1935f5b203ab66882946c0557b80b3ca990e636363048988442b905d2266454cfd5de
6
+ metadata.gz: 773bcdd25e8fb9bba1c2e5c022a9ecc09f87c5220c8366175c2ced86605788858359644dcb8a82fbca378b521a1b2382baea920e0f9c8f32508edfb3f22b3e51
7
+ data.tar.gz: c32decc196fb36b017dc6871f808869c011c98890f84c13b627501a42f0039afdc0353e21c7e26b7f4f6f3a576f602c689b10a00d414ef6677fa78b172b04070
data/README.md CHANGED
@@ -44,7 +44,7 @@ Heroicon comes with two variants, `:outline` and `:solid`. By default it uses th
44
44
  <%= heroicon "search", variant: :outline %>
45
45
  ```
46
46
 
47
- You can also pass a class to use on the icon.
47
+ You can also pass HTML options directly to the icon.
48
48
 
49
49
  ```rb
50
50
  <%= heroicon "search", options: { class: "text-primary-500" } %>
data/lib/heroicon/icon.rb CHANGED
@@ -15,7 +15,9 @@ module Heroicon
15
15
 
16
16
  doc = Nokogiri::HTML::DocumentFragment.parse(file)
17
17
  svg = doc.at_css "svg"
18
- svg["class"] = options[:class] if options[:class].present?
18
+ options.each do |key, value|
19
+ svg[key.to_s] = value
20
+ end
19
21
 
20
22
  doc
21
23
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Heroicon
4
- VERSION = "0.2.3"
4
+ VERSION = "0.3.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: heroicon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benjamin Hargett
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-04 00:00:00.000000000 Z
11
+ date: 2021-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails