File tree Expand file tree Collapse file tree
packages/govuk-frontend/src/govuk/components/panel Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3232 // it but the the text remains legible.
3333 overflow-wrap : break-word ;
3434 }
35- }
36-
37- .govuk-panel--confirmation {
38- color : govuk-colour (" white" );
39- background : govuk-colour (" green" );
4035
4136 @media print {
4237 border-color : currentcolor ;
4540 }
4641 }
4742
43+ .govuk-panel--confirmation {
44+ color : govuk-colour (" white" );
45+ background : govuk-colour (" green" );
46+ }
47+
4848 .govuk-panel__title {
4949 @include govuk-font-size ($size : 48 );
5050 @include govuk-typography-weight-bold ;
5555 .govuk-panel__title :last-child {
5656 margin-bottom : 0 ;
5757 }
58+
59+ .govuk-panel--interruption {
60+ color : govuk-colour (" white" );
61+ background-color : $govuk-brand-colour ;
62+ text-align : left ;
63+
64+ @include govuk-font ($size : 19 );
65+ }
5866}
Original file line number Diff line number Diff line change @@ -38,6 +38,23 @@ examples:
3838 options :
3939 titleHtml : Application complete
4040 text : ' Your reference number: HDJ2123F'
41+ - name : custom heading level
42+ options :
43+ titleText : Application complete
44+ headingLevel : 2
45+ text : ' Your reference number: HDJ2123F'
46+ - name : interruption
47+ options :
48+ titleText : Is your weight correct?
49+ html : |
50+ <p>You entered your age as <strong>109</strong>.</p>
51+ <div class="govuk-button-group">
52+ <button type="submit" class="govuk-button govuk-button--inverse" data-module="govuk-button">
53+ Yes, this is correct
54+ </button>
55+ <a href="#" class="govuk-link govuk-link--inverse">Change my age</a>
56+ </div>
57+ classes : govuk-panel--interruption
4158
4259 # Hidden examples are not shown in the review app, but are used for tests and HTML fixtures
4360 - name : title html as text
Original file line number Diff line number Diff line change 22
33{% set headingLevel = params .headingLevel if params .headingLevel else 1 -%}
44
5- <div class =" govuk-panel govuk-panel--confirmation
6- {%- if params.classes %} {{ params.classes }}{% endif %}"
5+ {%- set classNames = " govuk-panel" -%}
6+
7+ {%- if params .classes %}
8+ {% set classNames = classNames + " " + params .classes %}
9+ {% endif %}
10+
11+ {%- if (not params .classes ) or (not " govuk-panel--interruption" in params .classes ) %}
12+ {% set classNames = classNames + " govuk-panel--confirmation" -%}
13+ {% endif %}
14+
15+ <div class =" {{ classNames }}"
716 {{- govukAttributes(params.attributes) }} >
817 <h {{ headingLevel }} class =" govuk-panel__title" >
918 {{ params .titleHtml | safe if params .titleHtml else params .titleText }}
You can’t perform that action at this time.
0 commit comments