heroicons_helper 0.4.1 → 0.6.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 +4 -4
- data/README.md +5 -5
- data/lib/heroicons_helper/data.json +1 -3682
- data/lib/heroicons_helper/icon.rb +19 -16
- data/lib/heroicons_helper/version.rb +1 -1
- data/lib/heroicons_helper.rb +16 -3
- data/package-lock.json +15 -15
- data/package.json +1 -1
- data/script/keywords.json +1 -1
- data/script/update_heroicons +19 -36
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bbbab8ccd0d05be04deb3df081747364d962a5e21e581d427b0ebbeff67b54ae
|
4
|
+
data.tar.gz: fcff746233b82222604d54d5f5e01cfd5760de65892532c8cfb4ad4c5cc64505
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e539907cca91fa6a1f9ed11651238721bb8b7949184d4f8270ea58a5b73855257714d5ed97378cc7613857e31dd1dbcf927be05bbb487dc1fbc462f3c8a990fa
|
7
|
+
data.tar.gz: 36b3b4fe61cd709b59e36c61f8a05d2a2ce024bc11d6ff6bd54bce07990954516eb63df36f4caeddb384153ae711aa496ad64d338391e1fcea0ee2cc1e79ee61
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# HeroiconsHelper
|
2
2
|
|
3
|
-
This gem helps you use Heroicons in your Ruby projects. It's inspired by [heroicons-ruby](https://github.com/chunlea/heroicons-ruby) and [
|
3
|
+
This gem helps you use Heroicons in your Ruby projects. It's inspired by [heroicons-ruby](https://github.com/chunlea/heroicons-ruby) and [octicons_gem](https://github.com/primer/octicons/tree/main/lib/octicons_gem).
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -25,19 +25,19 @@ include HeroiconsHelper
|
|
25
25
|
You'll have a brand new method called `heroicon` whose signature looks like this:
|
26
26
|
|
27
27
|
```ruby
|
28
|
-
heroicon(
|
28
|
+
heroicon(icon, variant, attributes: {})
|
29
29
|
```
|
30
30
|
|
31
31
|
where
|
32
32
|
|
33
|
-
* `
|
34
|
-
* `variant` is the type of Heroicons (eg., `outline` or `
|
33
|
+
* `icon` is the Heroicon name (eg. `:bell` or `"bell")
|
34
|
+
* `variant` is the type of Heroicons (eg., `outline`, `solid`, or `mini`)
|
35
35
|
* `attributes` are any additional HTML attributes to add on to the resulting `svg` element
|
36
36
|
|
37
37
|
This one method call returns an object that represents the Heroicon, and you should call `to_svg` to get the resulting SVG string:
|
38
38
|
|
39
39
|
```ruby
|
40
|
-
outline_icon = heroicon("x", variant: HeroiconsHelper::Icon::VARIANT_OUTLINE)
|
40
|
+
outline_icon = heroicon("x-mark", variant: HeroiconsHelper::Icon::VARIANT_OUTLINE)
|
41
41
|
puts outline_icon.to_svg
|
42
42
|
```
|
43
43
|
```
|