Skip to content

Commit ba70e15

Browse files
Update migration guide
1 parent 335a7fc commit ba70e15

1 file changed

Lines changed: 21 additions & 21 deletions

File tree

‎docs/upgrade-to-6.0.md‎

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -130,28 +130,24 @@ This replaces the [list panel component](#list-panel) which was removed in NHS.U
130130

131131
The [summary list](https://service-manual.nhs.uk/design-system/components/summary-list) component now includes improvements from NHS.UK frontend v9.6.2:
132132

133-
- new props `noBorder` and `noActions` supported at `<SummaryList.Row>` level
133+
- new prop `noBorder` supported at `<SummaryList.Row>` level
134134
- new child component `<SummaryList.Action>` for row actions
135+
- removed unnecessary child component `<SummaryList.Actions>`
135136

136137
```patch
137138
<SummaryList>
138139
- <SummaryList.Row>
139140
+ <SummaryList.Row noBorder>
140141
<SummaryList.Key>Name</SummaryList.Key>
141142
<SummaryList.Value>Karen Francis</SummaryList.Value>
142-
<SummaryList.Actions>
143+
- <SummaryList.Actions>
143144
- <a href="#">
144145
- Change<span className="nhsuk-u-visually-hidden"> name</span>
145146
- </a>
146147
+ <SummaryList.Action href="#" visuallyHiddenText="name">
147148
+ Change
148149
+ </SummaryList.Action>
149-
</SummaryList.Actions>
150-
</SummaryList.Row>
151-
- <SummaryList.Row>
152-
+ <SummaryList.Row noActions>
153-
<SummaryList.Key>Date of birth</SummaryList.Key>
154-
<SummaryList.Value>15 March 1984</SummaryList.Value>
150+
- </SummaryList.Actions>
155151
</SummaryList.Row>
156152
</SummaryList>
157153
```
@@ -239,8 +235,8 @@ Read about [our guidance on error messages](https://service-manual.nhs.uk/design
239235
If you are using the `headingLevel` prop you will need to update any uppercase values to lowercase:
240236

241237
```patch
242-
- <Card.Heading headingLevel="H3">Example heading</Card.Heading>
243-
+ <Card.Heading headingLevel="h3">Example heading</Card.Heading>
238+
- <Card heading="Example heading" headingLevel="H3">
239+
+ <Card heading="Example heading" headingLevel="h3">
244240
```
245241

246242
### Restore visually hidden text for accessibility
@@ -460,14 +456,11 @@ Before:
460456
After:
461457

462458
```jsx
463-
<Card cardType="feature">
464-
<Card.Content>
465-
<Card.Heading id="C">C</Card.Heading>
466-
<ul className="nhsuk-list nhsuk-list--border">
467-
<li><a href="/conditions/chest-pain/">Chest pain</a></li>
468-
<li><a href="/conditions/cold-sores/">Cold sore</a></li>
469-
</ul>
470-
</Card.Content>
459+
<Card heading="C" headingProps={{ id: 'C' }} feature>
460+
<ul className="nhsuk-list nhsuk-list--border">
461+
<li><a href="/conditions/chest-pain/">Chest pain</a></li>
462+
<li><a href="/conditions/cold-sores/">Cold sore</a></li>
463+
</ul>
471464
</Card>
472465

473466
<div className="nhsuk-back-to-top">
@@ -622,6 +615,13 @@ To align with NHS.UK frontend, you must make the following changes:
622615
</Table>
623616
```
624617

618+
If you are using the `Table.Panel` child component, you should migrate to the feature card:
619+
620+
```patch
621+
- <Table.Panel heading="Other conditions like impetigo">
622+
+ <Card heading="Other conditions like impetigo" feature>
623+
```
624+
625625
### Textarea
626626

627627
You must rename the `Textarea` prop `textareaRef` to `ref` for consistency with other components:
@@ -642,12 +642,12 @@ You must rename the `TextInput` prop `inputRef` to `ref` for consistency with ot
642642

643643
### Warning callout
644644

645-
To align with NHS.UK frontend, the warning callout `WarningCallout.Label` component has been renamed to `WarningCallout.Heading` as shown:
645+
To align with NHS.UK frontend, the warning callout `WarningCallout.Label` component has been moved to the `heading` prop as shown:
646646

647647
```patch
648-
<WarningCallout>
648+
- <WarningCallout>
649+
+ <WarningCallout heading="School, nursery or work">
649650
- <WarningCallout.Label>School, nursery or work</WarningCallout.Label>
650-
+ <WarningCallout.Heading>School, nursery or work</WarningCallout.Heading>
651651
<p>
652652
Stay away from school, nursery or work until all the spots have crusted over. This is
653653
usually 5 days after the spots first appeared.

0 commit comments

Comments
 (0)