Skip to content

Commit 33fa97a

Browse files
anandamaryon1colinrotherham
authored andcommitted
select - align macro options descriptions with GOV
1 parent c12b657 commit 33fa97a

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

packages/nhsuk-frontend/src/nhsuk/components/select/macro-options.mjs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const params = {
1111
id: {
1212
type: 'string',
1313
required: false,
14-
description: 'The ID of the select. Defaults to the value of `name`.'
14+
description: 'ID for the select box. Defaults to the value of `name`.'
1515
},
1616
name: {
1717
type: 'string',
@@ -21,12 +21,13 @@ export const params = {
2121
items: {
2222
type: 'array',
2323
required: true,
24-
description: 'Array of option items for the select.',
24+
description: 'The items within the select component.',
2525
params: {
2626
value: {
2727
type: 'string',
2828
required: false,
29-
description: 'Value for the option item. Defaults to an empty string.'
29+
description:
30+
'Value for the option. If this is omitted, the value is taken from the text content of the option element.'
3031
},
3132
text: {
3233
type: 'string',
@@ -36,7 +37,8 @@ export const params = {
3637
selected: {
3738
type: 'boolean',
3839
required: false,
39-
description: 'Sets the option as the selected.'
40+
description:
41+
'Whether the option should be selected when the page loads. Takes precedence over the top-level `value` option.'
4042
},
4143
disabled: {
4244
type: 'boolean',
@@ -71,21 +73,21 @@ export const params = {
7173
},
7274
label: {
7375
type: 'object',
74-
required: false,
75-
description: 'Options for the label component.',
76+
required: true,
77+
description: 'The label used by the select component.',
7678
isComponent: true
7779
},
7880
hint: {
7981
type: 'object',
8082
required: false,
81-
description: 'Options for the hint component.',
83+
description: 'Can be used to add a hint to the select component.',
8284
isComponent: true
8385
},
8486
errorMessage: {
8587
type: 'object',
8688
required: false,
8789
description:
88-
'Options for the error message component. The error message component will not display if you use a falsy value for `errorMessage`, for example `false` or `null`.',
90+
'Can be used to add an error message to the select component. The error message component will not display if you use a falsy value for `errorMessage`, for example `false` or `null`.',
8991
isComponent: true
9092
},
9193
formGroup: {

0 commit comments

Comments
 (0)