nfg_ui 0.11.13 → 0.11.14
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/lib/nfg_ui/components/elements/button.rb +9 -3
- data/lib/nfg_ui/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: a19a2d2be8af2061aceb6bbbd42641a0b453ae9745c4254ab6390569381d9152
|
|
4
|
+
data.tar.gz: 57e290d78782475a9eca5b6e11c280b8b2e189facbf8da111cd20a1485e8ca34
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f11e73646e3b34e74a94567d8ad8b9d072a0de1e7715818c23bcc21d8e7c3195e4a0a41a8e7badcaf27c290bbd84d5584b91c3c3ccf6251e7aca39415fc1e573
|
|
7
|
+
data.tar.gz: '059c130c6a825eae43ad51279f211d3ae5ed3a4576e503380f91c93926e8cf3f5bfab3c29f0ff4f786aacbc3e924dd91f7514257ce838a79430f91a8de5538c9'
|
|
@@ -43,12 +43,14 @@ module NfgUi
|
|
|
43
43
|
end
|
|
44
44
|
|
|
45
45
|
def render
|
|
46
|
+
@body = yield if block_given?
|
|
47
|
+
|
|
46
48
|
if tooltip && disabled
|
|
47
49
|
content_tag(:span, disabled_component_tooltip_wrapper_html_options) do
|
|
48
50
|
content_tag(as, html_options) do
|
|
49
51
|
capture do
|
|
50
52
|
concat(left_icon_component) if left_icon
|
|
51
|
-
concat(
|
|
53
|
+
concat(body)
|
|
52
54
|
concat(right_icon_component) if icon
|
|
53
55
|
end
|
|
54
56
|
end
|
|
@@ -58,7 +60,7 @@ module NfgUi
|
|
|
58
60
|
content_tag(as, html_options) do
|
|
59
61
|
capture do
|
|
60
62
|
concat(left_icon_component) if left_icon
|
|
61
|
-
concat(
|
|
63
|
+
concat(body)
|
|
62
64
|
concat(right_icon_component) if icon
|
|
63
65
|
end
|
|
64
66
|
end
|
|
@@ -76,10 +78,14 @@ module NfgUi
|
|
|
76
78
|
|
|
77
79
|
def right_icon_component
|
|
78
80
|
NfgUi::Components::Foundations::Icon.new({ traits: [icon, :right],
|
|
79
|
-
class:
|
|
81
|
+
class: right_icon_class },
|
|
80
82
|
view_context).render
|
|
81
83
|
end
|
|
82
84
|
|
|
85
|
+
def right_icon_class
|
|
86
|
+
NfgUi::Components::Foundations::Icon::RIGHT_ICON_SPACER_CSS_CLASS if body.present?
|
|
87
|
+
end
|
|
88
|
+
|
|
83
89
|
def base_element
|
|
84
90
|
as
|
|
85
91
|
end
|
data/lib/nfg_ui/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: nfg_ui
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.11.
|
|
4
|
+
version: 0.11.14
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jonathan Roehm
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2021-03-
|
|
12
|
+
date: 2021-03-05 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: bootstrap
|