Skip to content

Commit 17146a7

Browse files
Remove implementation notes duplicated in args or examples
1 parent c7741b6 commit 17146a7

File tree

11 files changed

+14
-229
lines changed

11 files changed

+14
-229
lines changed

src/components/navigation/action-link/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This component can be found in the `nhsuk-frontend` repository [here](https://github.com/nhsuk/nhsuk-frontend/tree/main/packages/nhsuk-frontend/src/nhsuk/components/action-link).
44

5-
## Implementation Notes
5+
## Implementation notes
66

77
The ActionLink component does not use the `nhsuk-frontend` "openInNewWindow" property, instead it allows the user to add the `target="_blank"` property (if desired).
88

stories/Content Presentation/Details.stories.tsx

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,43 +4,13 @@ import { Details } from '#components';
44
/**
55
* This component can be found in the `nhsuk-frontend` repository <a href="https://github.com/nhsuk/nhsuk-frontend/tree/main/packages/nhsuk-frontend/src/nhsuk/components/contents-list" target="_blank">here</a>.
66
*
7-
* ## Implementation Notes
7+
* ## Implementation notes
88
*
99
* The `Details` component has three subcomponents:
1010
*
1111
* - `Details.Summary`
1212
* - `Details.Text`
1313
* - `Details.ExpanderGroup`
14-
*
15-
* ## Usage
16-
*
17-
* ### Standard
18-
*
19-
* ```jsx
20-
* import { Details } from "nhsuk-react-components";
21-
*
22-
* const Element = () => {
23-
* return (
24-
* <Details>
25-
* <Details.Summary>Where can I find my NHS number?</Details.Summary>
26-
* <Details.Text>
27-
* <p>An NHS number is a 10 digit number, like 485 777 3456.</p>
28-
* <p>
29-
* You can find your NHS number on any document sent to you by the NHS. This may include:
30-
* </p>
31-
* <ul>
32-
* <li>prescriptions</li>
33-
* <li>test results</li>
34-
* <li>hospital referral letters</li>
35-
* <li>appointment letters</li>
36-
* <li>your NHS medical card</li>
37-
* </ul>
38-
* <p>Ask your GP practice for help if you can't find your NHS number.</p>
39-
* </Details.Text>
40-
* </Details>
41-
* );
42-
* }
43-
* ```
4414
*/
4515
const meta: Meta<typeof Details> = {
4616
title: 'Content Presentation/Details',

stories/Content Presentation/DoAndDontList.stories.tsx

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,15 @@ import { DoAndDontList } from '#components';
44
/**
55
* This component can be found in the `nhsuk-frontend` repository <a href="https://github.com/nhsuk/nhsuk-frontend/tree/main/packages/nhsuk-frontend/src/nhsuk/components/do-dont-list" target="_blank" rel="noopener noreferrer">here</a>.
66
*
7-
* ## Implementation Notes
7+
* ## Implementation notes
88
*
99
* The `DoAndDontList` component has one subcomponent: `DoAndDontList.Item`.
1010
*
1111
* As long as a `listType` is supplied to the `DoAndDontList` component, all subcomponents will render as desired. If you require a `DoAndDontList.Item` to be different, a `listItemType` prop can be supplied to force the type.
1212
*
13-
*
1413
* The `DoAndDontList.Item` component can also accept a `prefixText` prop, which can be used to override the default prefix text.
1514
*
1615
* See the <b><a href="#custom-prefix-text" >custom prefix text</a></b> story for an example.
17-
*
18-
* ## Usage
19-
*
20-
* ### Standard
21-
*
22-
* ```jsx
23-
* import { DoAndDontList } from "nhsuk-react-components";
24-
*
25-
* const Element = () => {
26-
* return (
27-
* <DoAndDontList listType="do">
28-
* <DoAndDontList.Item>
29-
* cover blisters that are likely to burst with a soft plaster or dressing
30-
* </DoAndDontList.Item>
31-
* <DoAndDontList.Item>wash your hands before touching a burst blister</DoAndDontList.Item>
32-
* <DoAndDontList.Item>
33-
* allow the fluid in a burst blister to drain before covering it with a plaster or dressing
34-
* </DoAndDontList.Item>
35-
* </DoAndDontList>
36-
* );
37-
* }
38-
* ```
3916
*/
4017
const meta: Meta<typeof DoAndDontList> = {
4118
title: 'Content Presentation/DoAndDontList',

stories/Content Presentation/NotificationBanner.stories.tsx

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,13 @@ import { NotificationBannerLink } from '#components/content-presentation/notific
55
/**
66
* This component can be found in the `nhsuk-frontend` repository <a href="https://github.com/nhsuk/nhsuk-frontend/tree/main/packages/nhsuk-frontend/src/nhsuk/components/notification-banner" target="_blank">here</a>.
77
*
8-
* ## Implementation Notes
8+
* ## Implementation notes
99
*
1010
* The `NotificationBanner` component has three subcomponents:
1111
*
1212
* - `NotificationBanner.Title`
1313
* - `NotificationBanner.Heading`
1414
* - `NotificationBanner.Link`
15-
*
16-
* ## Usage
17-
*
18-
* ### Standard
19-
*
20-
* ```jsx
21-
* import { NotificationBanner } from "nhsuk-react-components";
22-
*
23-
* const Element = () => {
24-
* return (
25-
* <NotificationBanner>
26-
* <NotificationBanner.Heading>Patient record updated</Details.Summary>
27-
* <p>
28-
* Contact <NotificationBanner.Link href="#">example@department.nhs.uk</NotificationBanner.Link> if you think there&#39;s a problem.
29-
* </p>
30-
* </NotificationBanner>
31-
* );
32-
* }
33-
* ```
3415
*/
3516
const meta: Meta<typeof NotificationBanner> = {
3617
title: 'Content Presentation/Notification Banner',

stories/Form Elements/Button.stories.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,37 @@ import { Button } from '#components';
44
/**
55
* This component can be found in the `nhsuk-frontend` repository <a href="https://github.com/nhsuk/nhsuk-frontend/tree/main/packages/components/button" target="_blank" rel="noopener noreferrer">here</a>.
66
*
7-
* ## Implementation Notes
7+
* ## Implementation notes
88
*
99
* The `Button` component from `nhsuk-react-components` will either render a standard `<button>` or `<a>` element depending on whether an `href` prop is supplied.
1010
*
1111
* If you want to use a specific component instead of the wrapper, you can supply the `as="a"` or `as="button"` props.
1212
*
1313
* ## Usage
1414
*
15-
* ### Standard
15+
* ### As a button
1616
*
1717
* ```jsx
1818
* import { Button } from "nhsuk-react-components";
1919
*
2020
* const Element = () => {
21-
* return (
22-
* <Button>Button</Button>
23-
* );
21+
* return (
22+
* <Button>Button</Button>
23+
* );
2424
* }
2525
* ```
2626
*
27-
* ### As a Link
27+
* ### As a link
2828
*
2929
* ```jsx
3030
* import { Button } from "nhsuk-react-components";
3131
*
3232
* const ButtonEl = () => (
33-
* <Button as="a">Anchor</Button>
33+
* <Button as="a">Anchor</Button>
3434
* );
3535
*
3636
* const ButtonEl2 = () => (
37-
* <Button href="/link">Anchor</Button>
37+
* <Button href="/link">Anchor</Button>
3838
* );
3939
* ```
4040
*/

stories/Form Elements/Checkboxes.stories.tsx

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,11 @@ import { Checkboxes, TextInput } from '#components';
55
/**
66
* This component can be found in the `nhsuk-frontend` repository <a href="https://github.com/nhsuk/nhsuk-frontend/tree/main/packages/nhsuk-frontend/src/nhsuk/components/checkboxes" target="_blank" rel="noopener noreferrer">here</a>.
77
*
8-
* ## Implementation Notes
8+
* ## Implementation notes
99
*
1010
* For details on the new form design pattern, check the documentation for the `Form` component.
1111
*
1212
* The `Checkbox` component provides a `CheckboxesContext` context, which the `Checkboxes.Item` components use. When each box initially renders, it will attempt to assign itself an `id` by calling the `getBoxId` method in the context. This will assign each box a sequential ID using either the `idPrefix` or `name` supplied to the Checkbox. If neither are provided, the element will generate it's own unique identifier.
13-
*
14-
* ## Usage
15-
*
16-
* ### Standard
17-
*
18-
* ```jsx
19-
* import { Checkboxes } from "nhsuk-react-components";
20-
*
21-
* const Element = () => {
22-
* return (
23-
* <Checkboxes name="nationality" id="nationality">
24-
* <Checkboxes.Item value="british">British</Checkboxes.Item>
25-
* <Checkboxes.Item value="irish">Irish</Checkboxes.Item>
26-
* <Checkboxes.Item value="other">Citizen of another country</Checkboxes.Item>
27-
* </Checkboxes>
28-
* );
29-
* }
30-
* ```
3113
*/
3214

3315
const meta: Meta<typeof Checkboxes> = {

stories/Form Elements/ErrorMessage.stories.tsx

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,6 @@ import { ErrorMessage } from '#components';
33

44
/**
55
* This component can be found in the `nhsuk-frontend` repository <a href="https://github.com/nhsuk/nhsuk-frontend/tree/main/packages/nhsuk-frontend/src/nhsuk/components/error-message" target="_blank" rel="noopener noreferrer">here</a>.
6-
*
7-
* ## Implementation Notes
8-
*
9-
* The `ErrorMessage` component has a default `visuallyHiddenText` of "Error: ". This can be overriden using `visuallyHiddenText`.
10-
*
11-
* ## Usage
12-
*
13-
* ### Standard
14-
*
15-
* ```jsx
16-
* import { ErrorMessage } from "nhsuk-react-components";
17-
*
18-
* const Element = () => {
19-
* return (
20-
* <ErrorMessage>Enter your full name</ErrorMessage>
21-
* );
22-
* }
23-
* ```
246
*/
257
const meta: Meta<typeof ErrorMessage> = {
268
title: 'Form Elements/ErrorMessage',

stories/Form Elements/ErrorSummary.stories.tsx

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,13 @@ import { ErrorSummary } from '#components';
44
/**
55
* This component can be found in the `nhsuk-frontend` repository <a href="https://github.com/nhsuk/nhsuk-frontend/tree/main/packages/nhsuk-frontend/src/nhsuk/components/error-summary" target="_blank" rel="noopener noreferrer">here</a>.
66
*
7-
* ## Implementation Notes
7+
* ## Implementation notes
88
*
99
* The `ErrorSummary` component has three subcomponents:
1010
*
1111
* - `ErrorSummary.Title`
1212
* - `ErrorSummary.List`
1313
* - `ErrorSummary.ListItem`
14-
*
15-
* ## Usage
16-
*
17-
* ### Standard
18-
*
19-
* ```jsx
20-
* import { ErrorSummary } from "nhsuk-react-components";
21-
*
22-
* const Element = () => {
23-
* return (
24-
* <ErrorSummary>
25-
* <ErrorSummary.Title>There is a problem</ErrorSummary.Title>
26-
* <p>Describe the errors and how to correct them</p>
27-
* <ErrorSummary.List>
28-
* <ErrorSummary.ListItem href="#example-error-1">
29-
* Date of birth must be in the past
30-
* </ErrorSummary.ListItem>
31-
* </ErrorSummary.List>
32-
* </ErrorSummary>
33-
* );
34-
* }
35-
* ```
3614
*/
3715
const meta: Meta<typeof ErrorSummary> = {
3816
title: 'Form Elements/ErrorSummary',

stories/Form Elements/Fieldset.stories.tsx

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,6 @@ import { Fieldset, TextInput } from '#components';
33

44
/**
55
* This component can be found in the `nhsuk-frontend` repository <a href="https://github.com/nhsuk/nhsuk-frontend/tree/main/packages/nhsuk-frontend/src/nhsuk/components/fieldset" target="_blank" rel="noopener noreferrer">here</a>.
6-
*
7-
* ## Implementation Notes
8-
*
9-
* The `Fieldset` component has one subcomponent: `Fieldset.Legend`.
10-
*
11-
* The `Fieldset.Legend` component has one default prop: `headingLevel: 'h1'`. This can be overridden and any valid heading level can be used (i.e. `h1`, `h2`).
12-
*
13-
* ## Usage
14-
*
15-
* ### Standard
16-
*
17-
* ```jsx
18-
* import { Fieldset } from "nhsuk-react-components";
19-
*
20-
* const Element = () => {
21-
* return (
22-
* <Fieldset>
23-
* <Fieldset.Legend isPageHeading size="l">What is your address?</Fieldset.Legend>
24-
* </Fieldset>
25-
* );
26-
* }
27-
* ```
286
*/
297
const meta: Meta<typeof Fieldset> = {
308
title: 'Form Elements/Fieldset',

stories/Navigation/Breadcrumb.stories.tsx

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,6 @@ import { Breadcrumb, Container } from '#components';
33

44
/**
55
* This component can be found in the `nhsuk-frontend` repository <a href="https://github.com/nhsuk/nhsuk-frontend/tree/main/packages/components/breadcrumb" target="_blank">here</a>.
6-
*
7-
*
8-
* ## Implementation Notes
9-
*
10-
* The `Breadcrumb` component contains two subcomponents: `Breadcrumb.Item` and `Breadcrumb.Back`. These are both anchor elements.
11-
*
12-
* The base `Breadcrumb` component has the default prop `aria-label` set to `"Breadcrumb"`. This is only a default prop and can be overridden.
13-
*
14-
* ## Usage
15-
*
16-
* ```jsx
17-
* import { Breadcrumb } from "nhsuk-react-components";
18-
*
19-
* const Link = () => {
20-
* return (
21-
* <Container>
22-
* <Breadcrumb>
23-
* <Breadcrumb.Item href="/level-one">Level one</Breadcrumb.Item>
24-
* <Breadcrumb.Item href="/level-one/level-two">Level two</Breadcrumb.Item>
25-
* <Breadcrumb.Item href="/level-one/level-two/level-three">Level three</Breadcrumb.Item>
26-
* <Breadcrumb.Back href="/level-one/level-two/level-three">Level three</Breadcrumb.Back>
27-
* </Breadcrumb>
28-
* </Container>
29-
*
30-
* );
31-
* }
32-
* ```
336
*/
347
const meta: Meta<typeof Breadcrumb> = {
358
title: 'Navigation/Breadcrumb',

0 commit comments

Comments
 (0)