Skip to content

Commit 2d1b9a4

Browse files
Show hint text on nurse-facing health answers
1 parent bf5de8c commit 2d1b9a4

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

app/assets/stylesheets/core/elements/_index.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@use "../../vendor/nhsuk-frontend" as *;
22

33
blockquote {
4-
border-left: $nhsuk-border-width solid $nhsuk-border-colour;
4+
border-left: $nhsuk-border-width solid nhsuk-colour("blue");
55
margin-left: 0;
66
padding: nhsuk-spacing(2);
77
padding-left: nhsuk-spacing(3);

app/globals.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,13 +233,17 @@ export default () => {
233233
html += formatHealthAnswer(healthAnswer)
234234
}
235235

236-
const keyText = parentFacing
236+
let keyText = parentFacing
237237
? healthQuestions[key].label.replace('the child', 'your child')
238-
: healthQuestions[key].label
238+
: `<p class="nhsuk-body nhsuk-u-margin-bottom-1">${healthQuestions[key].label}</p>`
239+
240+
if (!parentFacing && healthQuestions[key].hint) {
241+
keyText += `<p class="nhsuk-hint nhsuk-u-font-size-16">${healthQuestions[key].hint}</p>`
242+
}
239243

240244
summaryRows.push({
241245
classes: undefined,
242-
key: { text: keyText },
246+
key: { html: keyText },
243247
value: { html },
244248
...(edit && {
245249
actions: {

0 commit comments

Comments
 (0)