sdr_view_components 0.1.6 → 0.1.7
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/app/components/sdr_view_components/elements/navigation/nav_item_component.rb +6 -2
- data/app/components/sdr_view_components/elements/toast_component.html.erb +3 -1
- data/app/components/sdr_view_components/elements/toast_component.rb +1 -1
- data/lib/sdr_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: 922b619be06bc6e16085fb78c7a864f55f3de6ed487e50a8e746f3e3a5173560
|
|
4
|
+
data.tar.gz: 7e0a6b7edbb738707553d5bb70919372429c5b5890e943c393c1eddde2ad106f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 499e4fab33d04108d386d9078130620d635f088f8e3d32312ad0e5f81be4744d5b33f0326090fc1e7bb1d206e6eaee454fa3bb02b81a2a65d9db68b3689e883d
|
|
7
|
+
data.tar.gz: 7262325a09c98dd14f89260050f1e0560272fce01ca485f6c9198767a32b11b923f875f0a97be98b2efa8ce626637f407fbe5b051717c9e248a5d0b7a4cc3fb1
|
|
@@ -5,7 +5,7 @@ module SdrViewComponents
|
|
|
5
5
|
module Navigation
|
|
6
6
|
# Component for navigation item link.
|
|
7
7
|
class NavItemComponent < BaseComponent
|
|
8
|
-
def initialize(text:, path
|
|
8
|
+
def initialize(text:, path: nil, data: {})
|
|
9
9
|
@text = text
|
|
10
10
|
@path = path
|
|
11
11
|
@data = data
|
|
@@ -16,7 +16,11 @@ module SdrViewComponents
|
|
|
16
16
|
|
|
17
17
|
def call
|
|
18
18
|
tag.li class: 'nav-item' do
|
|
19
|
-
|
|
19
|
+
if path.present?
|
|
20
|
+
link_to text, path, class: 'nav-link', data:
|
|
21
|
+
else
|
|
22
|
+
tag.span text, class: 'nav-link'
|
|
23
|
+
end
|
|
20
24
|
end
|
|
21
25
|
end
|
|
22
26
|
end
|
|
@@ -4,7 +4,7 @@ module SdrViewComponents
|
|
|
4
4
|
module Elements
|
|
5
5
|
# Component for rendering a toast element.
|
|
6
6
|
class ToastComponent < BaseComponent
|
|
7
|
-
def initialize(title:, text
|
|
7
|
+
def initialize(title:, text: nil, close_text: nil, variant: :black)
|
|
8
8
|
@title = title
|
|
9
9
|
@text = text
|
|
10
10
|
@close_text = close_text
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sdr_view_components
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Aaron Collier
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2025-12-
|
|
10
|
+
date: 2025-12-16 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: rails
|