Skip to content

Commit 291be8c

Browse files
committed
Adding v2 upgrade docs
1 parent bab95d5 commit 291be8c

File tree

2 files changed

+26
-4
lines changed

2 files changed

+26
-4
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
- [NHS.UK React Components](#nhsuk-react-components)
44
- [Coming from 0.x?](#coming-from-0x)
5+
- [Upgrading to 2.0](#upgrading-to-20)
56
- [Installation](#installation)
67
- [Usage](#usage)
78
- [Storybook](#storybook)
@@ -16,6 +17,10 @@ NHS.UK Frontend ported to React
1617

1718
If you're coming from versions of the library prior to 1.0.0, please give [this doc](/docs/upgrade-to-1.0.md) a brief read, as there a number of changes between 0.x release and the 1.0 release.
1819

20+
## Upgrading to 2.0
21+
22+
If you're upgrading to 2.0, please be aware we have made some breaking changes. [This doc](/docs/upgrade-to-2.0.md) has the details.
23+
1924
## Installation
2025

2126
You can install this package using either `yarn` or `npm`.

CHANGELOG.md renamed to docs/upgrade-to-2.0.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
# Unreleased Changes
1+
# Upgrading to 2.0
2+
3+
There are some breaking changes you'll need to be aware of when upgrading to v2. These are mostly related to us upgrading our dependency on [nhsuk-frontend to v4](https://github.com/nhsuk/nhsuk-frontend/blob/master/CHANGELOG.md#400---26-october-2020) which also includes some breaking changes.
4+
25
## New Card Component
36

47
The new Card component from `nhsuk-frontend` 4 has been added. Check out the storybook for usage examples!
58

6-
## WarningCallout
9+
## Warning Callout
710

8-
### Removal of WarningCallout "label" prop
11+
### Removal of Warning Callout `label` prop
912

1013
The WarningCallout `label` prop has been removed, and replaced with `WarningCallout.Label`.
1114

@@ -30,7 +33,7 @@ Existing usages of the WarningCallout will need to be replaced with the new synt
3033
</WarningCallout>
3134
```
3235

33-
### Addition of hidden text on the WarningCallout.Label
36+
### Addition of hidden text on the Warning Callout Label
3437

3538
The `WarningCallout.Label` now has the hidden text `Important: ` before the label content. If this causes an issue in your application, and you would like to change or disable this hidden text you are able to do via the `visuallyHiddenText` prop.
3639

@@ -64,3 +67,17 @@ import { Panel, Promo } from "nhsuk-react-components/deprecated";
6467
```
6568

6669
A warning is printed to the console in dev environments when using these components, as they are set to be removed in the next major release.
70+
71+
## Date component input type has changed
72+
73+
In line with the upstream nhsuk-frontend, NHS Design Kit and GDS recommendations, we now render the input boxes in the date component as follows:
74+
75+
```html
76+
<input type="text" inputType="numeric" pattern="[0-9]*">
77+
```
78+
79+
There is more on this change here:
80+
81+
- [NHSDigital/nhsuk-react-components#108](https://github.com/NHSDigital/nhsuk-react-components/pull/108)
82+
- [nhsuk/nhsuk-frontend#666](https://github.com/nhsuk/nhsuk-frontend/pull/666)
83+
- https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/

0 commit comments

Comments
 (0)