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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7bdf0839ecbe0f5046c63a0cca80caa808aa3b0d4f8d5f5280253523742d28d0
4
- data.tar.gz: d4d694316d383bdbfe93f0f1974d0ca14daedbe24e7d48371636b75384ddebaf
3
+ metadata.gz: fc5053813a261dbf7186f651f83acd14de2649b640fd92b6a4c3012caa6a8275
4
+ data.tar.gz: 43d9197a5f643ddd30e9b4eb65853f3426eb709788a208b5d9d627e394318a9f
5
5
  SHA512:
6
- metadata.gz: b3aec4489d49df3becca14855f389a4479f82393a6aa231e220f7553202252a8c51a0dab7fd4dfa514e879db12b9c12beacf0db0be0694f412510a81e5c2d486
7
- data.tar.gz: 6429c8416c30dbd25c4afe381f0991f1b505e20faf74e99ad1fe32784345209da388d86ec980dda52c1d1aa3fd3b0f9a2e09d965cadf929e9fb2d6a65ec3c140
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 = 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
@@ -1,5 +1,5 @@
1
1
  module Govuk
2
2
  module Components
3
- VERSION = '1.1.5'.freeze
3
+ VERSION = '1.1.6'.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: 1.1.5
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-25 00:00:00.000000000 Z
11
+ date: 2021-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties