-
Notifications
You must be signed in to change notification settings - Fork 5
/
Footer.story.js
98 lines (96 loc) · 3.09 KB
/
Footer.story.js
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
import React from "react";
import { action } from "@storybook/addon-actions";
import { storiesOf } from "@storybook/react";
import Button, { buttonTypes, buttonSizes } from "@crave/farmblocks-button";
import Footer from "./Footer";
storiesOf("Footer", module)
.add("without actions", () => (
<Footer
helpText="Have questions about account setup?"
helpLinkText="Get support"
helpLinkHref="#"
helpImageSrc="https://crave-whatsgood-sandbox.imgix.net/businesses/32/inventory/8fae5d32-f6d4-47bb-8062-e4e85c47788b.png"
/>
))
.add("with one action", () => (
<Footer
helpText="Have questions about account setup?"
helpLinkText="Get support"
onHelpLinkClick={action("onHelpLinkClick")}
actions={[
<Button onClick={action("onSaveClick")} text="Save" key="save" />,
]}
helpImageSrc="https://crave-whatsgood-sandbox.imgix.net/businesses/32/inventory/8fae5d32-f6d4-47bb-8062-e4e85c47788b.png"
/>
))
.add("with two actions", () => (
<Footer
helpText="Have questions about account setup?"
helpLinkText="Get support"
onHelpLinkClick={action("onHelpLinkClick")}
actions={[
<Button
onClick={action("onCancelClick")}
text="Cancel"
key="cancel"
size={buttonSizes.MEDIUM}
/>,
<Button
onClick={action("onSaveClick")}
text="Save"
type={buttonTypes.PRIMARY}
key="save"
size={buttonSizes.MEDIUM}
/>,
]}
helpImageSrc="https://crave-whatsgood-sandbox.imgix.net/businesses/32/inventory/8fae5d32-f6d4-47bb-8062-e4e85c47788b.png"
/>
))
.add("without link", () => (
<Footer
helpText="Have questions about account setup?"
actions={[
<Button onClick={action("onSaveClick")} text="Save" key="save" />,
]}
helpImageSrc="https://crave-whatsgood-sandbox.imgix.net/businesses/32/inventory/8fae5d32-f6d4-47bb-8062-e4e85c47788b.png"
/>
))
.add("without image", () => (
<Footer
helpText="Have questions about account setup?"
helpLinkText="Get support"
helpLinkHref="#"
actions={[
<Button onClick={action("onSaveClick")} text="Save" key="save" />,
]}
/>
))
.add("custom font size", () => (
<Footer
helpText="Have questions about account setup?"
helpLinkText="Get support"
helpLinkHref="#"
helpImageSrc="https://crave-whatsgood-sandbox.imgix.net/businesses/32/inventory/8fae5d32-f6d4-47bb-8062-e4e85c47788b.png"
helpFontSize={12}
/>
))
.add("extended style", () => (
<Footer
css="
border-color: orangered;
.image {
transform: rotate(-45deg);
}
.text {
text-shadow: 0 0 8px tomato;
}
.link {
border: solid 1px deeppink;
}
"
helpText="Have questions about account setup?"
helpLinkText="Get support"
onHelpLinkClick={action("onHelpLinkClick")}
helpImageSrc="https://crave-whatsgood-sandbox.imgix.net/businesses/32/inventory/8fae5d32-f6d4-47bb-8062-e4e85c47788b.png"
/>
));