optics_view_components 0.1.3 → 0.1.4
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 +4 -1
- data/app/components/optics/button/component.rb +3 -2
- data/lib/optics/view_components/version.rb +1 -1
- 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: ffe52b98369672a1d6eed1b8243910a5e407ac98deb91b0d85d01838b2d008ba
|
|
4
|
+
data.tar.gz: b200545febaac7348d8c12489c7d5e5baad3781bd4af61f2ba644f50a640940e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6a821b4466922983f0dcbd589beac2e16fd6134440f1b8d3746198c3ef3852e8bdf088a86ea7d612a0a35d3218d80aef3d9e086df0d0a7e6d4d4137819dd6aa0
|
|
7
|
+
data.tar.gz: 9c42b42d99b2c36586d27ffc3c20dc56249b388360cb804ee13ae359abb81b3712acc879621ebeef99c39536e42458400ee279ce8b00e4715c982b4da8c4cc6f
|
data/README.md
CHANGED
|
@@ -31,7 +31,10 @@ Use in a view:
|
|
|
31
31
|
Add to `config/application.rb`:
|
|
32
32
|
|
|
33
33
|
```
|
|
34
|
-
config.lookbook
|
|
34
|
+
if config.respond_to?(:lookbook)
|
|
35
|
+
config.lookbook.component_paths << Optics::ViewComponents::Engine.root.join('app/components')
|
|
36
|
+
end
|
|
37
|
+
|
|
35
38
|
config.view_component.preview_paths << Optics::ViewComponents::Engine.root.join('previews')
|
|
36
39
|
```
|
|
37
40
|
|
|
@@ -27,9 +27,9 @@ module Optics
|
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
def build_button(&)
|
|
30
|
-
return link_to(url, class: classes, **@attributes, &) if url
|
|
30
|
+
return link_to(url, class: classes, **@attributes.except(:class), &) if url
|
|
31
31
|
|
|
32
|
-
tag.button(class: classes, **@attributes, &)
|
|
32
|
+
tag.button(class: classes, **@attributes.except(:class), &)
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
def button_class
|
|
@@ -40,6 +40,7 @@ module Optics
|
|
|
40
40
|
|
|
41
41
|
def classes
|
|
42
42
|
class_names(
|
|
43
|
+
@attributes[:class],
|
|
43
44
|
button_class,
|
|
44
45
|
size_class,
|
|
45
46
|
'btn--icon': icon,
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: optics_view_components
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Reed Law
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-
|
|
11
|
+
date: 2023-06-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: view_component
|