Skip to content

Commit 10df41c

Browse files
committed
Fix Storybook for Tag Component
1 parent f77ec55 commit 10df41c

File tree

2 files changed

+25
-32
lines changed

2 files changed

+25
-32
lines changed

stories/CareCard.stories.tsx

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ export const NonUrgent = () => (
99
<li>you're not sure it's chickenpox</li>
1010
<li>the skin around the blisters is red, hot or painful (signs of infection)</li>
1111
<li>
12-
your child is
13-
{' '}
14-
<a href="https://www.nhs.uk/conditions/dehydration">dehydrated</a>
12+
your child is <a href="https://www.nhs.uk/conditions/dehydration">dehydrated</a>
1513
</li>
1614
<li>you're concerned about your child or they get worse</li>
1715
</ul>
@@ -50,8 +48,8 @@ export const Immediate = () => (
5048
<li>also started with shortness of breath, sweating and feeling or being sick</li>
5149
</ul>
5250
<p>
53-
You could be having a heart attack. Call 999 immediately as you need immediate treatment
54-
in hospital.
51+
You could be having a heart attack. Call 999 immediately as you need immediate treatment in
52+
hospital.
5553
</p>
5654
</CareCard.Content>
5755
</CareCard>
@@ -65,9 +63,7 @@ export const WithoutVisuallyHiddenText = () => (
6563
<li>you're not sure it's chickenpox</li>
6664
<li>the skin around the blisters is red, hot or painful (signs of infection)</li>
6765
<li>
68-
your child is
69-
{' '}
70-
<a href="https://www.nhs.uk/conditions/dehydration">dehydrated</a>
66+
your child is <a href="https://www.nhs.uk/conditions/dehydration">dehydrated</a>
7167
</li>
7268
<li>you're concerned about your child or they get worse</li>
7369
</ul>
@@ -87,9 +83,7 @@ export const WithCustomVisuallyHiddenText = () => (
8783
<li>you're not sure it's chickenpox</li>
8884
<li>the skin around the blisters is red, hot or painful (signs of infection)</li>
8985
<li>
90-
your child is
91-
{' '}
92-
<a href="https://www.nhs.uk/conditions/dehydration">dehydrated</a>
86+
your child is <a href="https://www.nhs.uk/conditions/dehydration">dehydrated</a>
9387
</li>
9488
<li>you're concerned about your child or they get worse</li>
9589
</ul>
@@ -101,7 +95,6 @@ export const WithCustomVisuallyHiddenText = () => (
10195
</CareCard>
10296
);
10397

104-
10598
export default {
10699
title: 'Components/CareCard',
107100
component: CareCard,

stories/Tag.stories.tsx

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
/* eslint-disable import/no-extraneous-dependencies */
22
import React from 'react';
3-
import { storiesOf } from '@storybook/react';
4-
import centered from '@storybook/addon-centered';
53
import { Tag } from '../src';
64

7-
const stories = storiesOf('Tag', module);
5+
export const StandardTag = () => <Tag>Active</Tag>;
86

9-
stories
10-
.addDecorator(centered)
11-
.add('Standard Tag', () => <Tag>Active</Tag>)
12-
.add('All Colours', () => (
13-
<div className="tag-wrapper">
14-
<Tag color="white">Started</Tag>
15-
<Tag color="grey">Not started</Tag>
16-
<Tag color="green">New</Tag>
17-
<Tag color="aqua-green">Active</Tag>
18-
<Tag color="blue">Pending</Tag>
19-
<Tag color="purple">Received</Tag>
20-
<Tag color="pink">Sent</Tag>
21-
<Tag color="red">Rejected</Tag>
22-
<Tag color="orange">Declined</Tag>
23-
<Tag color="yellow">Delayed</Tag>
24-
</div>
25-
));
7+
export const AllColours = () => (
8+
<div className="tag-wrapper">
9+
<Tag color="white">Started</Tag>
10+
<Tag color="grey">Not started</Tag>
11+
<Tag color="green">New</Tag>
12+
<Tag color="aqua-green">Active</Tag>
13+
<Tag color="blue">Pending</Tag>
14+
<Tag color="purple">Received</Tag>
15+
<Tag color="pink">Sent</Tag>
16+
<Tag color="red">Rejected</Tag>
17+
<Tag color="orange">Declined</Tag>
18+
<Tag color="yellow">Delayed</Tag>
19+
</div>
20+
);
21+
22+
export default {
23+
title: 'Components/Tag',
24+
component: Tag,
25+
};

0 commit comments

Comments
 (0)