Skip to content

Commit 2223d9a

Browse files
authored
Merge pull request #405 from DEFRA/feature/notification-banner-component
DF-1099: Notification banner component
2 parents 8420eb3 + 099bb2d commit 2223d9a

8 files changed

Lines changed: 211 additions & 4 deletions

File tree

package-lock.json

Lines changed: 37 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/client/stylesheets/_prose.scss

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,22 @@
5454
@extend %govuk-section-break--xl;
5555
}
5656
}
57+
58+
.govuk-notification-banner__content {
59+
.app-prose-scope > :last-child {
60+
margin-bottom: 0;
61+
}
62+
}
63+
64+
// GOV.UK Frontend does not expose placeholder selectors for these — class selectors are the only option.
65+
.app-prose-notification-banner-scope {
66+
p {
67+
// stylelint-disable-next-line scss/at-extend-no-missing-placeholder
68+
@extend .govuk-notification-banner__heading;
69+
}
70+
71+
a {
72+
// stylelint-disable-next-line scss/at-extend-no-missing-placeholder
73+
@extend .govuk-notification-banner__link;
74+
}
75+
}

src/server/forms/simple-form.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,25 @@ pages:
7878
id: '00738799-3489-4ab2-a57b-542eecb31bfa'
7979
next: []
8080
id: da0fbdb4-a2de-4650-be16-9ba552af135f
81+
- title: ''
82+
path: '/notification-demo'
83+
components:
84+
- type: NotificationBanner
85+
title: Important
86+
name: notificationImportant
87+
content: 'Contact us if you need [help with your application](https://www.defra.gov.uk).'
88+
options:
89+
heading: There may be a delay in processing your application.
90+
id: ca6b6590-1608-49f4-82f9-9d92e38e66ea
91+
- type: NotificationBanner
92+
title: Success
93+
name: notificationSuccess
94+
content: 'Your application has been submitted.'
95+
options:
96+
type: success
97+
id: b6960f4b-d771-4956-9c9b-17da5c603062
98+
next: []
99+
id: be4b4b86-514c-43bb-8cdc-f9aed6155924
81100
- id: 449a45f6-4541-4a46-91bd-8b8931b07b50
82101
title: ''
83102
path: '/summary'

0 commit comments

Comments
 (0)