-
Notifications
You must be signed in to change notification settings - Fork 27
/
index.story.jsx
77 lines (70 loc) · 1.98 KB
/
index.story.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import React from "react";
import { AlertBarPresentational } from "./features/alert-bar/default";
export default {
title: "Blocks/Alert Bar",
parameters: {
// Set the viewports in Chromatic at a component level.
chromatic: { viewports: [320, 1200] },
},
};
const headlineText = "7 questions about traveling to Australia during catastrophic fires, answered";
const longHeadlineText =
"This is a really long headline, especially with the longest word pneumonoultramicroscopicsilicovolcanoconiosis pneumonoultramicroscopicsilicovolcanoconiosis pneumonoultramicroscopicsilicovolcanoconiosis pneumonoultramicroscopicsilicovolcanoconiosis pneumonoultramicroscopicsilicovolcanoconiosis pneumonoultramicroscopicsilicovolcanoconiosis pneumonoultramicroscopicsilicovolcanoconiosis";
const linkUrl = "https://storybook.js.org";
export const headlineAndLink = () => (
<AlertBarPresentational
alertRef={null}
arcSite="story-book"
barAriaLabel="Alert bar"
closeAriaLabel="Close"
hideAlertHandler={null}
linkText={headlineText}
url={linkUrl}
/>
);
export const noHeadlineAndWithLink = () => (
<AlertBarPresentational
alertRef={null}
arcSite="story-book"
barAriaLabel="Alert bar"
closeAriaLabel="Close"
hideAlertHandler={null}
linkText=""
url={linkUrl}
/>
);
export const headlineAndNoLink = () => (
<AlertBarPresentational
alertRef={null}
arcSite="story-book"
barAriaLabel="Alert bar"
closeAriaLabel="Close"
hideAlertHandler={null}
linkText={headlineText}
url=""
/>
);
export const headlineWithReallyLongText = () => (
<AlertBarPresentational
alertRef={null}
arcSite="story-book"
barAriaLabel="Alert bar"
closeAriaLabel="Close"
hideAlertHandler={null}
linkText={longHeadlineText}
url={linkUrl}
/>
);
export const rightToLeft = () => (
<div dir="rtl">
<AlertBarPresentational
alertRef={null}
arcSite="story-book"
barAriaLabel="Alert bar"
closeAriaLabel="Close"
hideAlertHandler={null}
linkText={headlineText}
url={linkUrl}
/>
</div>
);