Skip to content

Commit d6336c2

Browse files
Remove legacy list panel component
1 parent feeead4 commit d6336c2

File tree

9 files changed

+99
-221
lines changed

9 files changed

+99
-221
lines changed

src/__tests__/index.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ describe('Index', () => {
4141
'Legend',
4242
'NavAZ',
4343
'Pagination',
44-
'Panel',
4544
'Radios',
4645
'ReadingWidth',
4746
'ReviewDate',

src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ export { default as TextInput } from './components/form-elements/text-input';
3333
export { default as InsetText } from './components/content-presentation/inset-text';
3434
export { default as Label } from './components/form-elements/label';
3535
export { Container, Col, Row } from './components/layout';
36-
export { default as Panel } from './patterns/panel';
3736
export { default as NavAZ } from './patterns/nav-a-z';
3837
export { default as Pagination } from './components/navigation/pagination';
3938
export { default as Radios } from './components/form-elements/radios';

src/patterns/panel/Panel.tsx

Lines changed: 0 additions & 66 deletions
This file was deleted.

src/patterns/panel/__tests__/Panel.test.tsx

Lines changed: 0 additions & 68 deletions
This file was deleted.

src/patterns/panel/__tests__/__snapshots__/Panel.test.tsx.snap

Lines changed: 0 additions & 37 deletions
This file was deleted.

src/patterns/panel/index.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

stories/Navigation/Card.stories.tsx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,27 @@ export const FeatureCard: Story = {
7272
),
7373
};
7474

75+
export const FeatureCardWithList: Story = {
76+
render: () => (
77+
<Card cardType="feature">
78+
<Card.Content>
79+
<Card.Heading>Feature card heading</Card.Heading>
80+
<ul className="nhsuk-list nhsuk-list--border">
81+
<li>
82+
<a href="/conditions/abdominal-aortic-aneurysm/">AAA</a>
83+
</li>
84+
<li>
85+
<a href="/conditions/abdominal-aortic-aneurysm/">Abdominal aortic aneurysm</a>
86+
</li>
87+
<li>
88+
<a href="/conditions/abscess/">Abscess</a>
89+
</li>
90+
</ul>
91+
</Card.Content>
92+
</Card>
93+
),
94+
};
95+
7596
export const PrimaryCardWithChevron: Story = {
7697
render: () => (
7798
<Card clickable cardType="primary">

stories/Patterns/PageAZ.stories.tsx

Lines changed: 78 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ import React from 'react';
22
import { Meta, StoryObj } from '@storybook/react';
33
import NavAZ from '@patterns/nav-a-z';
44
import HeadingLevel from '@components/utils/HeadingLevel';
5-
import Panel from '@patterns/panel/Panel';
65
import Container from '@components/layout/Container';
76
import Row from '@components/layout/Row';
87
import Col from '@components/layout/Col';
8+
import { Card } from '../../src';
99

1010
/**
1111
* A to Z is a way of presenting a number of pages alphabetically.
@@ -62,28 +62,86 @@ export const Standard: Story = {
6262
<NavAZ.LinkItem href="#Z">Z</NavAZ.LinkItem>
6363
</NavAZ>
6464

65-
<Panel label="A" labelProps={{ id: 'A' }} backToTop backToTopLink="#nhsuk-nav-a-z">
66-
<Panel.LinkItem href="/conditions/abdominal-aortic-aneurysm/">AAA</Panel.LinkItem>
67-
<Panel.LinkItem href="/conditions/abdominal-aortic-aneurysm/">
68-
Abdominal aortic aneurysm
69-
</Panel.LinkItem>
70-
<Panel.LinkItem href="/conditions/abscess/">Abscess</Panel.LinkItem>
71-
</Panel>
65+
<Card cardType="feature">
66+
<Card.Content>
67+
<Card.Heading id="A">A</Card.Heading>
68+
<ul className="nhsuk-list nhsuk-list--border">
69+
<li>
70+
<a href="/conditions/abdominal-aortic-aneurysm/">AAA</a>
71+
</li>
72+
<li>
73+
<a href="/conditions/abdominal-aortic-aneurysm/">Abdominal aortic aneurysm</a>
74+
</li>
75+
<li>
76+
<a href="/conditions/abscess/">Abscess</a>
77+
</li>
78+
</ul>
79+
</Card.Content>
80+
</Card>
7281

73-
<Panel label="B" labelProps={{ id: 'B' }} backToTop backToTopLink="#nhsuk-nav-a-z">
74-
<Panel.Item>There are currently no conditions listed</Panel.Item>
75-
</Panel>
82+
<div className="nhsuk-back-to-top">
83+
<a className="nhsuk-back-to-top__link" href="#nhsuk-nav-a-z">
84+
Back to top
85+
</a>
86+
</div>
7687

77-
<Panel label="C" labelProps={{ id: 'C' }} backToTop backToTopLink="#nhsuk-nav-a-z">
78-
<Panel.LinkItem href="/conditions/chest-pain/">Chest pain</Panel.LinkItem>
79-
<Panel.LinkItem href="/conditions/cold-sores/">Cold sore</Panel.LinkItem>
80-
</Panel>
88+
<Card cardType="feature">
89+
<Card.Content>
90+
<Card.Heading id="B">B</Card.Heading>
91+
<ul className="nhsuk-list nhsuk-list--border">
92+
<li>There are currently no conditions listed</li>
93+
</ul>
94+
</Card.Content>
95+
</Card>
8196

82-
<Panel label="D" labelProps={{ id: 'D' }} backToTop backToTopLink="#nhsuk-nav-a-z">
83-
<Panel.LinkItem href="/conditions/dandruff/">Dandruff</Panel.LinkItem>
84-
<Panel.LinkItem href="/conditions/dementia/">Dementia</Panel.LinkItem>
85-
<Panel.LinkItem href="/conditions/toothache/">Toothache</Panel.LinkItem>
86-
</Panel>
97+
<div className="nhsuk-back-to-top">
98+
<a className="nhsuk-back-to-top__link" href="#nhsuk-nav-a-z">
99+
Back to top
100+
</a>
101+
</div>
102+
103+
<Card cardType="feature">
104+
<Card.Content>
105+
<Card.Heading id="C">C</Card.Heading>
106+
<ul className="nhsuk-list nhsuk-list--border">
107+
<li>
108+
<a href="/conditions/chest-pain/">Chest pain</a>
109+
</li>
110+
<li>
111+
<a href="/conditions/cold-sores/">Cold sore</a>
112+
</li>
113+
</ul>
114+
</Card.Content>
115+
</Card>
116+
117+
<div className="nhsuk-back-to-top">
118+
<a className="nhsuk-back-to-top__link" href="#nhsuk-nav-a-z">
119+
Back to top
120+
</a>
121+
</div>
122+
123+
<Card cardType="feature">
124+
<Card.Content>
125+
<Card.Heading id="D">D</Card.Heading>
126+
<ul className="nhsuk-list nhsuk-list--border">
127+
<li>
128+
<a href="/conditions/dandruff/">Dandruff</a>
129+
</li>
130+
<li>
131+
<a href="/conditions/dementia/">Dementia</a>
132+
</li>
133+
<li>
134+
<a href="/conditions/toothache/">Dental pain</a>
135+
</li>
136+
</ul>
137+
</Card.Content>
138+
</Card>
139+
140+
<div className="nhsuk-back-to-top">
141+
<a className="nhsuk-back-to-top__link" href="#nhsuk-nav-a-z">
142+
Back to top
143+
</a>
144+
</div>
87145
</Col>
88146
</Row>
89147
</main>

stories/Patterns/Panel.stories.tsx

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)