govuk-components 2.0.0 → 2.0.1

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: 39ac79b41b17e5f17f5f6b80e195595ae1396f5d83a3a14c14564412831fdbc8
4
- data.tar.gz: 587e0b9a9688c4c239e1e8cbdf44111c88aa82cd1014197293b308d0b2409f36
3
+ metadata.gz: bc521c772f5513d62d1b8fd78e77a504c4c1eb913770ffc1dd5d2d3020946980
4
+ data.tar.gz: ee85598308825985ca7e84120562fbecb04c7b6f359aba0bc37386e2a33f8a9f
5
5
  SHA512:
6
- metadata.gz: 826c5c80a39daefff656c96139c8f3c0ad6ceaffa7c8000a482f5b35a085b0f3251c7ded964c5bff0bc7a977287f77ed4ca2f5e4684d73e279d589de946e97a3
7
- data.tar.gz: cb1e686cf23ef788c4d45544bd1c4cc97cdb91a560a9ca7653d71b299dedfc735721b67b7d22062823f21283f56889e43e6a3b8e35eac29d8395cf9b1dfc169c
6
+ metadata.gz: 0c20bba8e5c5b9457d2065edd6f496f8ad93f1baebc7206e5a89260629db9713b59385f61857312aff3947716bc2d1e14064843dd6543655a619e1a050a88f4c
7
+ data.tar.gz: 8f1c590b69e35bb0ba47840a7fc7f3b12eb6ec6ee30ef92e58cfb67852a1954633808911100160491a0fd1a1d8a1353603cdbcc2eae55fa0686782717a9aa250
@@ -33,11 +33,7 @@
33
33
  <%= tag.ul(class: navigation_classes, id: "navigation", aria: { label: navigation_label }) do %>
34
34
  <% navigation_items.each do |item| %>
35
35
  <%= tag.li(class: item.classes.append(item.active_class), **item.html_attributes) do %>
36
- <% if item.link? %>
37
- <%= link_to(item.text, item.href, class: "govuk-header__link") %>
38
- <% else %>
39
- <%= item.text %>
40
- <% end %>
36
+ <%= item %>
41
37
  <% end %>
42
38
  <% end %>
43
39
  <% end %>
@@ -75,6 +75,14 @@ private
75
75
  href.present?
76
76
  end
77
77
 
78
+ def call
79
+ if link?
80
+ link_to(text, href, class: "govuk-header__link")
81
+ else
82
+ text
83
+ end
84
+ end
85
+
78
86
  private
79
87
 
80
88
  def default_classes
@@ -1,5 +1,5 @@
1
1
  module Govuk
2
2
  module Components
3
- VERSION = '2.0.0'.freeze
3
+ VERSION = '2.0.1'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk-components
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - DfE developers
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-18 00:00:00.000000000 Z
11
+ date: 2021-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -209,7 +209,7 @@ homepage: https://github.com/DFE-Digital/govuk-components
209
209
  licenses:
210
210
  - MIT
211
211
  metadata: {}
212
- post_install_message:
212
+ post_install_message:
213
213
  rdoc_options: []
214
214
  require_paths:
215
215
  - lib
@@ -225,7 +225,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
225
225
  version: '0'
226
226
  requirements: []
227
227
  rubygems_version: 3.1.6
228
- signing_key:
228
+ signing_key:
229
229
  specification_version: 4
230
230
  summary: Lightweight set of reusable GOV.UK Design System components
231
231
  test_files: []