govuk_publishing_components 21.49.0 → 21.50.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 159d020ba82914af6816875f569ef650b3bde9b0a3573048c576cdd2e3b0d864
|
4
|
+
data.tar.gz: 777fcff7c030364ae8018fee71e746c24ab1b60aaa4a08bc7a1665ffe704086e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf14fda6410001b1c39da5fc1e878ad6865cf0ba4d13110b1af3ea0c9bf2745ff949ab7ade06cf12449e34a3855108d655e92b5b32ce42e5dd78b2a5f94a0692
|
7
|
+
data.tar.gz: 7e8af37602ddc795cba2d4f5c2c81888169bd9a0919ec9c5c16db2c1fd298aa6a0a62b331ce5579ae6afee9069af07c793a2d58a473b853dc0325b55c3a4caa4
|
@@ -4,6 +4,7 @@
|
|
4
4
|
label ||= false
|
5
5
|
full_width ||= false
|
6
6
|
name ||= id
|
7
|
+
is_page_heading ||= false
|
7
8
|
heading_size = false unless ['s', 'm', 'l', 'xl'].include?(heading_size)
|
8
9
|
error_message ||= nil
|
9
10
|
error_id ||= nil
|
@@ -28,7 +29,11 @@
|
|
28
29
|
%>
|
29
30
|
<% if options.any? && id && label %>
|
30
31
|
<%= content_tag :div, class: css_classes do %>
|
31
|
-
|
32
|
+
<% if is_page_heading %>
|
33
|
+
<%= tag.h1 label_tag(id, label, class: label_classes), class: "gem-c-title__text" %>
|
34
|
+
<% else %>
|
35
|
+
<%= label_tag(id, label, class: label_classes) %>
|
36
|
+
<% end %>
|
32
37
|
|
33
38
|
<% if error_message %>
|
34
39
|
<%= render "govuk_publishing_components/components/error_message", {
|
@@ -143,3 +143,15 @@ examples:
|
|
143
143
|
value: 'option2'
|
144
144
|
- text: 'Option three'
|
145
145
|
value: 'option3'
|
146
|
+
with_page_heading:
|
147
|
+
description: This adds a H1 element with a label element inside containing the text supplied.
|
148
|
+
data:
|
149
|
+
id: 'select-with-heading'
|
150
|
+
label: 'This is a page heading'
|
151
|
+
heading_size: 'xl'
|
152
|
+
is_page_heading: true
|
153
|
+
options:
|
154
|
+
- text: 'Option one'
|
155
|
+
value: 'option1'
|
156
|
+
- text: 'Option two'
|
157
|
+
value: 'option2'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk_publishing_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 21.
|
4
|
+
version: 21.50.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GOV.UK Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gds-api-adapters
|