optics_view_components 0.1.3 → 0.1.5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 54fb6a68b7cdd5b3ccd449bca62f7011af24f36fc541a92d7da7d8254b26047b
|
4
|
+
data.tar.gz: aa821b1b78cabd2f2f2f78aa9aecefa4b40590fe76be411cafb6ec9b5675fb8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 172d34c022dcd91ac936ada62fb622c3836c14d22528f98a89e8eaf25cdf5539e496523e9dcc95303abf6f8c54c4ceba3b5bd0f2a3bb30eccf1380da80c7ba10
|
7
|
+
data.tar.gz: 34faf6863d961a9c7d12ad5a3ce12a49d35718a9b30abb7a912929181988777e72bf945fa97769756b614a756a555653914da72f9cd31967543b2f58d939c587
|
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,
|
@@ -21,7 +21,8 @@ module Optics
|
|
21
21
|
class: classes,
|
22
22
|
'aria-label': title,
|
23
23
|
title:,
|
24
|
-
data
|
24
|
+
data:,
|
25
|
+
**@attributes.except(:class)
|
25
26
|
) do
|
26
27
|
name
|
27
28
|
end
|
@@ -30,6 +31,7 @@ module Optics
|
|
30
31
|
def classes
|
31
32
|
class_names(
|
32
33
|
'material-symbols-outlined',
|
34
|
+
@attributes[:class],
|
33
35
|
size_class,
|
34
36
|
weight_class,
|
35
37
|
emphasis_class,
|
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.5
|
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-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: view_component
|