Skip to content

Commit 857b76c

Browse files
committed
Ad changelog entry for Promo/Panel deprecation
1 parent 8164bc3 commit 857b76c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,18 @@ The `WarningCallout.Label` now has the hidden text `Important: ` before the labe
4949
## Hint component renders as div
5050

5151
The `Hint` component now renders as a `div` element rather than a `span`.
52+
53+
## Deprecation of Panel & Promo Components
54+
55+
The `Panel` and `Promo` components have been removed from `nhsuk-frontend` since version 4.0.0. As a result, we have deprecated these components. These components work exactly as they did before, with the only difference being a slightly different import.
56+
57+
```jsx
58+
// Old Imports
59+
import { Button, Panel, Promo } from "nhsuk-react-components";
60+
61+
// New Imports
62+
import { Button } from "nhsuk-react-components";
63+
import { Panel, Promo } from "nhsuk-react-components/deprecated";
64+
```
65+
66+
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.

0 commit comments

Comments
 (0)