govuk-components 1.1.5 → 1.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/components/govuk_component/breadcrumbs.rb +8 -3
- data/lib/govuk/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: fc5053813a261dbf7186f651f83acd14de2649b640fd92b6a4c3012caa6a8275
|
4
|
+
data.tar.gz: 43d9197a5f643ddd30e9b4eb65853f3426eb709788a208b5d9d627e394318a9f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c23bc16a3acefaefc365388925f769529593371ec7352be230d255f75288610d8cd2c49ccb31ac5c18515bfbff008b7045fa00359c164b52c0a05133331b1147
|
7
|
+
data.tar.gz: e6dbb5cb608edb3c7f0412fdc7f1e90aa02cc8176ba312660323f2c2c18479c693735b41bc78bb84855aff50c455ac2ff94ff1f1c327716ede2167bae176ad25
|
@@ -1,15 +1,20 @@
|
|
1
1
|
class GovukComponent::Breadcrumbs < GovukComponent::Base
|
2
2
|
attr_accessor :breadcrumbs
|
3
3
|
|
4
|
-
def initialize(breadcrumbs:, classes: [], html_attributes: {})
|
4
|
+
def initialize(breadcrumbs:, hide_in_print: false, collapse_on_mobile: false, classes: [], html_attributes: {})
|
5
5
|
super(classes: classes, html_attributes: html_attributes)
|
6
6
|
|
7
|
-
@breadcrumbs
|
7
|
+
@breadcrumbs = breadcrumbs
|
8
|
+
@hide_in_print = hide_in_print
|
9
|
+
@collapse_on_mobile = collapse_on_mobile
|
8
10
|
end
|
9
11
|
|
10
12
|
private
|
11
13
|
|
12
14
|
def default_classes
|
13
|
-
%w(govuk-breadcrumbs)
|
15
|
+
%w(govuk-breadcrumbs).tap do |classes|
|
16
|
+
classes << "govuk-!-display-none-print" if @hide_in_print
|
17
|
+
classes << "govuk-breadcrumbs--collapse-on-mobile" if @collapse_on_mobile
|
18
|
+
end
|
14
19
|
end
|
15
20
|
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: 1.1.
|
4
|
+
version: 1.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DfE developers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|