optics_view_components 0.1.3 → 0.1.4

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: c7e868dbff72f35b8979429a0a6ab9cb6690f1ed46ff5d4ca3d658aaec5fcd68
4
- data.tar.gz: 5200729a15f3672e8afb161e7437909f8ec55b8d6c4e189ba9d44349e5e58111
3
+ metadata.gz: ffe52b98369672a1d6eed1b8243910a5e407ac98deb91b0d85d01838b2d008ba
4
+ data.tar.gz: b200545febaac7348d8c12489c7d5e5baad3781bd4af61f2ba644f50a640940e
5
5
  SHA512:
6
- metadata.gz: 21c5922dabf1c062f5b184d8650ac9b0616df298770d519a87abbd577ba237ff039d0fa1759df5172cc8a39e21018a2013ac6f65a97fb7eeceeaa64edf779f20
7
- data.tar.gz: '06913b6c9d7d9718ec86f6d9f81f648fa0a9ed2bc19e1a73eef0c614c0995f958c105bcf29a8074358ee221c153e2af12fda0d991a7dadc66bcbb98f81e52299'
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.component_paths << Optics::ViewComponents::Engine.root.join('app/components/optics')
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,
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Optics
4
4
  module ViewComponents
5
- VERSION = '0.1.3'
5
+ VERSION = '0.1.4'
6
6
  end
7
7
  end
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.3
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-05-23 00:00:00.000000000 Z
11
+ date: 2023-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: view_component