@sikka/hawa 0.0.6 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/es/index.es.js +1 -1
  2. package/lib/index.js +1 -1
  3. package/package.json +2 -1
  4. package/src/blocks/Account/UserProfile.js +57 -7
  5. package/src/blocks/AuthForms/NewPasswordForm.js +59 -42
  6. package/src/blocks/AuthForms/ResetPasswordForm.js +46 -33
  7. package/src/blocks/AuthForms/SignInForm.js +60 -32
  8. package/src/blocks/AuthForms/SignUpForm.js +74 -45
  9. package/src/blocks/Payment/ChargeWalletForm.js +38 -17
  10. package/src/blocks/Payment/CreditCardForm.js +50 -21
  11. package/src/blocks/Payment/PayWithWallet.js +4 -25
  12. package/src/blocks/Payment/SelectPayment.js +18 -39
  13. package/src/layout/Box.js +9 -9
  14. package/src/stories/BlocksStories/AuthForm.stories.js +9 -9
  15. package/src/stories/BlocksStories/PaymentForm.stories.js +10 -6
  16. package/src/stories/BlocksStories/UserForm.stories.js +41 -0
  17. package/src/stories/Introduction.stories.mdx +229 -0
  18. package/src/stories/LayoutStories/Box.stories.js +4 -4
  19. package/src/stories/UIStories/ActionButton.stories.js +15 -22
  20. package/src/stories/UIStories/AdaptiveButton.stories.js +43 -42
  21. package/src/stories/UIStories/Alert.stories.js +4 -17
  22. package/src/stories/UIStories/LogoButtons.stories.js +90 -0
  23. package/src/stories/UIStories/RadioSelector.stories.js +20 -35
  24. package/src/stories/UIStories/SettingsRow.stories.js +64 -0
  25. package/src/themes/HawaProvider.js +64 -20
  26. package/src/ui/ActionButton.js +12 -11
  27. package/src/ui/AdaptiveButton.js +43 -159
  28. package/src/ui/HawaAlert.js +6 -6
  29. package/src/ui/HawaButton.js +6 -6
  30. package/src/ui/HawaInputLabel.js +4 -4
  31. package/src/ui/HawaLogoButton.js +102 -12
  32. package/src/ui/HawaRadio.js +50 -28
  33. package/src/ui/HawaSettingsRow.js +71 -0
  34. package/src/ui/HawaTextField.js +29 -35
  35. package/src/ui/HawaTypography.js +5 -6
  36. package/src/ui/index.js +2 -15
  37. package/storybook-static/iframe.html +1 -1
  38. package/storybook-static/main.5731dbe3.iframe.bundle.js +1 -0
  39. package/storybook-static/vendors~main.aa1d952a.iframe.bundle.js +76 -0
  40. package/storybook-static/{vendors~main.30a2c5d7.iframe.bundle.js.LICENSE.txt → vendors~main.aa1d952a.iframe.bundle.js.LICENSE.txt} +0 -15
  41. package/storybook-static/vendors~main.aa1d952a.iframe.bundle.js.map +1 -0
  42. package/src/stories/BlocksStories/UserAccount.stories.js +0 -46
  43. package/src/stories/GlobalVariables.stories.js +0 -44
  44. package/src/stories/Introduction.stories.js +0 -233
  45. package/src/ui/ApplePayButton.js +0 -93
  46. package/src/ui/GithubButton.js +0 -90
  47. package/src/ui/GoogleButton.js +0 -82
  48. package/src/ui/GooglePayButton.js +0 -93
  49. package/src/ui/MadaButton.js +0 -93
  50. package/src/ui/PayPalButton.js +0 -93
  51. package/src/ui/STCPayButton.js +0 -93
  52. package/src/ui/TwitterButton.js +0 -83
  53. package/src/ui/VisaMasterButton.js +0 -93
  54. package/src/ui/WalletButton.js +0 -24
  55. package/storybook-static/main.e55ce615.iframe.bundle.js +0 -1
  56. package/storybook-static/vendors~main.30a2c5d7.iframe.bundle.js +0 -76
  57. package/storybook-static/vendors~main.30a2c5d7.iframe.bundle.js.map +0 -1
@@ -5,7 +5,7 @@ import {
5
5
  SignInForm,
6
6
  SignUpForm
7
7
  } from "../../blocks/AuthForms";
8
- import { defaultTheme, HawaProvider } from "../../themes/HawaProvider";
8
+ import { HawaProvider } from "../../themes/HawaProvider";
9
9
 
10
10
  export default {
11
11
  title: "Blocks/AuthBlocks",
@@ -20,11 +20,10 @@ export default {
20
20
 
21
21
  const SignInTemplate = (args) => {
22
22
  return (
23
- <HawaProvider theme={{ ...defaultTheme }}>
23
+ <HawaProvider themeName={args.theme}>
24
24
  <SignInForm
25
25
  {...args}
26
26
  error={args.showError}
27
- theme={args.theme}
28
27
  handleSignIn={(e) => console.log("singing in via email", e)}
29
28
  viaGoogle={args.viaGoogle}
30
29
  googleButtonLabel={"Sign in with Google"}
@@ -51,10 +50,9 @@ SignIn.args = {
51
50
 
52
51
  const SignUpTemplate = (args) => {
53
52
  return (
54
- <HawaProvider theme={{ ...defaultTheme }}>
53
+ <HawaProvider themeName={args.theme}>
55
54
  <SignUpForm
56
55
  {...args}
57
- theme={args.theme}
58
56
  error={args.showError}
59
57
  handleSignUp={() => console.log("singing up via email")}
60
58
  viaGoogle={args.viaGoogle}
@@ -81,7 +79,7 @@ SignUp.args = {
81
79
 
82
80
  const ResetPasswordTemplate = (args) => {
83
81
  return (
84
- <HawaProvider theme={{ ...defaultTheme }}>
82
+ <HawaProvider themeName={args.theme}>
85
83
  <ResetPasswordForm error={args.showError} theme={args.theme} {...args} />
86
84
  </HawaProvider>
87
85
  );
@@ -89,11 +87,12 @@ const ResetPasswordTemplate = (args) => {
89
87
  export const ResetPassword = ResetPasswordTemplate.bind({});
90
88
  ResetPassword.args = {
91
89
  theme: "primary",
92
- showError: false
90
+ showError: false,
91
+ sent: false
93
92
  };
94
93
  const NewPasswordTemplate = (args) => {
95
94
  return (
96
- <HawaProvider theme={{ ...defaultTheme }}>
95
+ <HawaProvider themeName={args.theme}>
97
96
  <NewPasswordForm error={args.showError} theme={args.theme} {...args} />
98
97
  </HawaProvider>
99
98
  );
@@ -101,5 +100,6 @@ const NewPasswordTemplate = (args) => {
101
100
  export const NewPassword = NewPasswordTemplate.bind({});
102
101
  NewPassword.args = {
103
102
  theme: "primary",
104
- showError: false
103
+ showError: false,
104
+ passwordChanged: false
105
105
  };
@@ -25,6 +25,7 @@ export default {
25
25
  args: {
26
26
  theme: "primary",
27
27
  viaWallet: true,
28
+ viaMada: true,
28
29
  viaApplePay: true,
29
30
  viaGooglePay: true,
30
31
  viaSTCPay: true,
@@ -35,10 +36,9 @@ export default {
35
36
 
36
37
  export const PaymentSelection = (args) => {
37
38
  return (
38
- <HawaProvider theme={{ ...defaultTheme }}>
39
+ <HawaProvider themeName={args.theme}>
39
40
  <SelectPayment
40
41
  {...args}
41
- theme={args.theme}
42
42
  walletLabel="Wallet Balance"
43
43
  handleWallet={() => console.log("paying via wallet")}
44
44
  visaMasterLabel="Credit Card"
@@ -74,9 +74,13 @@ export const PayViaCreditCard = (args) => {
74
74
  };
75
75
 
76
76
  export const ChargeWallet = (args) => {
77
- return <ChargeWalletForm theme={args.theme} currency="SAR" />;
77
+ return (
78
+ <HawaProvider themeName={args.theme}>
79
+ <ChargeWalletForm currency="SAR" />
80
+ </HawaProvider>
81
+ );
78
82
  };
79
83
 
80
- // ChargeWallet.args = {
81
- // theme: "secondary"
82
- // };
84
+ ChargeWallet.args = {
85
+ theme: "secondary"
86
+ };
@@ -0,0 +1,41 @@
1
+ import React from "react";
2
+ import { UserProfile } from "../../blocks/Account";
3
+ import { defaultTheme, HawaProvider } from "../../themes/HawaProvider";
4
+
5
+ export default {
6
+ title: "Blocks/UserBlocks",
7
+ component: UserProfile,
8
+ argTypes: {
9
+ theme: {
10
+ options: ["primary", "secondary", "default"],
11
+ control: { type: "select" }
12
+ }
13
+ }
14
+ };
15
+
16
+ const theme = {
17
+ ...defaultTheme,
18
+ paddings: 20
19
+ };
20
+
21
+ export const UserAccount = (args) => {
22
+ return (
23
+ <HawaProvider theme={{ ...defaultTheme, ...theme }}>
24
+ <UserProfile {...args} />
25
+ </HawaProvider>
26
+ );
27
+ };
28
+
29
+ UserAccount.args = {
30
+ theme: "primary"
31
+ };
32
+ export const UserSettings = (args) => {
33
+ return (
34
+ <HawaProvider theme={{ ...defaultTheme, ...theme }}>
35
+ <UserProfile {...args} />
36
+ </HawaProvider>
37
+ );
38
+ };
39
+ UserSettings.args = {
40
+ theme: "primary"
41
+ };
@@ -0,0 +1,229 @@
1
+ import { Meta } from "@storybook/addon-docs"
2
+ // import Code from './assets/code-brackets.svg';
3
+ // import Colors from './assets/colors.svg';
4
+ // import Comments from './assets/comments.svg';
5
+ // import Direction from './assets/direction.svg';
6
+ // import Flow from './assets/flow.svg';
7
+ // import Plugin from './assets/plugin.svg';
8
+ // import Repo from './assets/repo.svg';
9
+ // import StackAlt from './assets/stackalt.svg';
10
+
11
+ <Meta title="Introduction" />
12
+
13
+ <style>{`
14
+ .subheading {
15
+ --mediumdark: '#999999';
16
+ font-weight: 900;
17
+ font-size: 13px;
18
+ color: #999;
19
+ letter-spacing: 6px;
20
+ line-height: 24px;
21
+ text-transform: uppercase;
22
+ margin-bottom: 12px;
23
+ margin-top: 40px;
24
+ }
25
+
26
+ .link-list {
27
+ display: grid;
28
+ grid-template-columns: 1fr;
29
+ grid-template-rows: 1fr 1fr;
30
+ row-gap: 10px;
31
+ }
32
+
33
+ @media (min-width: 620px) {
34
+ .link-list {
35
+ row-gap: 20px;
36
+ column-gap: 20px;
37
+ grid-template-columns: 1fr 1fr;
38
+ }
39
+ }
40
+
41
+ @media all and (-ms-high-contrast:none) {
42
+ .link-list {
43
+ display: -ms-grid;
44
+ -ms-grid-columns: 1fr 1fr;
45
+ -ms-grid-rows: 1fr 1fr;
46
+ }
47
+ }
48
+
49
+ .link-item {
50
+ display: block;
51
+ padding: 20px 30px 20px 15px;
52
+ border: 1px solid #00000010;
53
+ border-radius: 5px;
54
+ transition: background 150ms ease-out, border 150ms ease-out, transform 150ms ease-out;
55
+ color: #333333;
56
+ display: flex;
57
+ flex-direction:column;
58
+ align-items: flex-start;
59
+ }
60
+
61
+ .link-item:hover {
62
+ border-color: #1EA7FD50;
63
+ transform: translate3d(0, -3px, 0);
64
+ box-shadow: rgba(0, 0, 0, 0.08) 0 3px 10px 0;
65
+ }
66
+
67
+ .link-item:active {
68
+ border-color: #1EA7FD;
69
+ transform: translate3d(0, 0, 0);
70
+ }
71
+
72
+ .link-item strong {
73
+ font-weight: 700;
74
+ display: block;
75
+ margin-bottom: 2px;
76
+ }
77
+
78
+ .link-item img {
79
+ height: 40px;
80
+ width: 40px;
81
+ margin-right: 15px;
82
+ flex: none;
83
+ }
84
+
85
+ .link-item span {
86
+ font-size: 14px;
87
+ line-height: 20px;
88
+ }
89
+
90
+ .tip {
91
+ display: inline-block;
92
+ border-radius: 1em;
93
+ font-size: 11px;
94
+ line-height: 12px;
95
+ font-weight: 700;
96
+ background: #E7FDD8;
97
+ color: #66BF3C;
98
+ padding: 4px 12px;
99
+ margin-right: 10px;
100
+ vertical-align: top;
101
+ }
102
+
103
+ .tip-wrapper {
104
+ font-size: 13px;
105
+ line-height: 20px;
106
+ margin-top: 40px;
107
+ margin-bottom: 40px;
108
+ }
109
+
110
+ .tip-wrapper code {
111
+ font-size: 12px;
112
+ display: inline-block;
113
+ }
114
+
115
+
116
+ `}</style>
117
+
118
+ # Welcome to Hawa
119
+
120
+ <div className="tip-wrapper">
121
+ <span className="tip">Notice</span>This page is still in progress
122
+ </div>
123
+
124
+ Storybook helps you build UI components in isolation from your app's business logic, data, and context.
125
+ That makes it easy to develop hard-to-reach states. Save these UI states as **stories** to revisit during development, testing, or QA.
126
+
127
+ Browse example stories now by navigating to them in the sidebar.
128
+ View their code in the `src/stories` directory to learn how they work.
129
+ We recommend building UIs with a [**component-driven**](https://componentdriven.org) process starting with atomic components and ending with pages.
130
+
131
+ <div className="subheading">Structure</div>
132
+
133
+ <div className="link-list">
134
+ <a
135
+ className="link-item"
136
+ href="https://storybook.js.org/docs/react/addons/addon-types"
137
+ target="_blank"
138
+ >
139
+ {/* <img src={Plugin} alt="plugin" /> */}
140
+ <h3>Layout</h3>
141
+ <span>
142
+ <strong>Presets for popular tools</strong>
143
+ Easy setup for TypeScript, SCSS and more.
144
+ </span>
145
+ </a>
146
+ <a
147
+ className="link-item"
148
+ href="https://storybook.js.org/docs/react/configure/webpack"
149
+ target="_blank"
150
+ >
151
+ {/* <img src={StackAlt} alt="Build" /> */}
152
+ <h3>Blocks</h3>
153
+ <span>
154
+ <strong>Build configuration</strong>
155
+ How to customize webpack and Babel
156
+ </span>
157
+
158
+ </a>
159
+ <a
160
+ className="link-item"
161
+ href="https://storybook.js.org/docs/react/configure/styling-and-css"
162
+ target="_blank"
163
+ >
164
+ {/* <img src={Colors} alt="colors" /> */}
165
+ <h3>Elements</h3>
166
+ <span>
167
+ <strong>Styling</strong>
168
+ How to load and configure CSS libraries
169
+ </span>
170
+ </a>
171
+ <a
172
+ className="link-item"
173
+ href="https://storybook.js.org/docs/react/get-started/setup#configure-storybook-for-your-stack"
174
+ target="_blank"
175
+ >
176
+ {/* <img src={Flow} alt="flow" /> */}
177
+ <h3>UI</h3>
178
+ <span>
179
+ <strong>Data</strong>
180
+ Providers and mocking for data libraries
181
+ </span>
182
+ </a>
183
+ </div>
184
+
185
+ <div className="subheading">Learn</div>
186
+
187
+ <div className="link-list">
188
+ <a className="link-item" href="https://storybook.js.org/docs" target="_blank">
189
+ {/* <img src={Repo} alt="repo" /> */}
190
+ <span>
191
+ <strong>Storybook documentation</strong>
192
+ Configure, customize, and extend
193
+ </span>
194
+ </a>
195
+ <a
196
+ className="link-item"
197
+ href="https://storybook.js.org/tutorials/"
198
+ target="_blank"
199
+ >
200
+ {/* <img src={Direction} alt="direction" /> */}
201
+ <span>
202
+ <strong>In-depth guides</strong>
203
+ Best practices from leading teams
204
+ </span>
205
+ </a>
206
+ <a
207
+ className="link-item"
208
+ href="https://github.com/storybookjs/storybook"
209
+ target="_blank"
210
+ >
211
+ {/* <img src={Code} alt="code" /> */}
212
+ <span>
213
+ <strong>GitHub project</strong>
214
+ View the source and add issues
215
+ </span>
216
+ </a>
217
+ <a className="link-item" href="https://discord.gg/storybook" target="_blank">
218
+ {/* <img src={Comments} alt="comments" /> */}
219
+ <span>
220
+ <strong>Discord chat</strong>
221
+ Chat with maintainers and the community
222
+ </span>
223
+ </a>
224
+ </div>
225
+
226
+ <div className="tip-wrapper">
227
+ <span className="tip">Tip</span>Edit the Markdown in{" "}
228
+ <code>src/stories/Introduction.stories.mdx</code>
229
+ </div>
@@ -7,14 +7,14 @@ const theme = {
7
7
 
8
8
  const Template = (args) => {
9
9
  return (
10
- <HawaProvider size={args.size} theme={{ ...defaultTheme, ...args.theme }}>
11
- <Box themeType="primary">Box 1</Box>
12
- <Box themeType="secondary">
10
+ <HawaProvider size={args.size} themeName={"secondary"}>
11
+ <Box>Box 1</Box>
12
+ <Box>
13
13
  <div style={{ backgroundColor: "white", padding: 10, color: "black" }}>
14
14
  testing box in box
15
15
  </div>
16
16
  </Box>
17
- <Box themeType="secondary">Box 3</Box>
17
+ <Box>Box 3</Box>
18
18
  </HawaProvider>
19
19
  );
20
20
  };
@@ -1,37 +1,24 @@
1
1
  import React from "react";
2
-
3
- import { defaultTheme, HawaProvider } from "../../themes/HawaProvider";
2
+ import { HawaProvider } from "../../themes/HawaProvider";
4
3
  import { ActionButton } from "../../ui";
5
4
 
6
- const Template = (args) => {
7
- return (
8
- <HawaProvider theme={{ ...defaultTheme }}>
9
- <ActionButton themeType={args.theme} text={args.buttonLabel} />
10
- </HawaProvider>
11
- );
12
- };
13
- //types:
14
- //error (red)
15
- //warning (red)
16
- //notice (blue)
17
-
18
5
  export default {
19
- title: "UI/ActionButton",
6
+ title: "Elements/Buttons/ActionButton",
20
7
  component: ActionButton,
21
8
  argTypes: {
22
9
  theme: {
23
- description: "overwritten description",
24
- table: {
25
- type: {
26
- summary: "something short"
27
- },
28
- defaultValue: { summary: "Hello" }
29
- },
30
10
  options: ["primary", "secondary", "default"],
31
11
  control: { type: "select" }
32
12
  }
33
13
  }
34
14
  };
15
+ const Template = (args) => {
16
+ return (
17
+ <HawaProvider themeName={args.theme}>
18
+ <ActionButton text={args.buttonLabel} />
19
+ </HawaProvider>
20
+ );
21
+ };
35
22
 
36
23
  Template.args = {
37
24
  showText: true,
@@ -51,3 +38,9 @@ Secondary.args = {
51
38
  buttonLabel: "test",
52
39
  theme: "secondary"
53
40
  };
41
+ export const Default = Template.bind({});
42
+ Default.args = {
43
+ showText: true,
44
+ buttonLabel: "test",
45
+ theme: "default"
46
+ };
@@ -3,22 +3,8 @@ import CastIcon from "@mui/icons-material/Cast";
3
3
  import { HawaProvider } from "../../themes/HawaProvider";
4
4
  import { AdaptiveButton } from "../../ui";
5
5
 
6
- const Template = (args) => {
7
- const theme = {
8
- borderRadius: 10,
9
- primaryColor: "#004fff",
10
- secondaryColor: "red",
11
- // margins: "10px",
12
- paddings: 10
13
- };
14
- return (
15
- <HawaProvider theme={theme}>
16
- <AdaptiveButton {...args} />
17
- </HawaProvider>
18
- );
19
- };
20
6
  export default {
21
- title: "UI/AdaptiveButton",
7
+ title: "Elements/Buttons/AdaptiveButton",
22
8
  component: AdaptiveButton,
23
9
  argsTypes: {
24
10
  buttonLabel: { control: "text" },
@@ -26,40 +12,53 @@ export default {
26
12
  buttonColor: { control: "color" },
27
13
  padding: { control: "number" },
28
14
  hintTitle: { control: "text" },
29
- hintContent: { control: "text" }
15
+ hintContent: { control: "text" },
16
+ theme: {
17
+ options: ["primary", "secondary", "default"],
18
+ control: { type: "select" }
19
+ }
30
20
  },
31
21
  args: {
32
- // type: "text",
33
- // buttonLabel: "Test"
34
- // borderRadius: 15,
35
22
  hintTitle: "test",
36
23
  hintContent: "more test",
37
- buttonColor: "#f9f9f9"
24
+ buttonColor: "#f9f9f9",
25
+ theme: "primary"
38
26
  }
39
27
  };
40
28
 
41
- export const Light = Template.bind({});
42
- Light.args = {
43
- showText: true,
44
- buttonLabel: "test",
45
- borderRadius: 5,
46
- icon: <CastIcon />,
47
- textColor: "#000000",
48
- buttonColor: "#f9f9f9"
29
+ const Template = (args) => {
30
+ return (
31
+ <HawaProvider themeName={args.theme}>
32
+ <AdaptiveButton {...args} />
33
+ </HawaProvider>
34
+ );
35
+ };
36
+
37
+ export const FullButton = Template.bind({});
38
+ FullButton.args = {
39
+ // showText: true,
40
+ // buttonLabel: "test",
41
+ // borderRadius: 5,
42
+ // icon: <CastIcon />,
43
+ // textColor: "#000000",
44
+ // buttonColor: "#f9f9f9",
45
+ theme: "primary"
49
46
  // placeholder: "Example ...",
50
47
  // defaultValue: "This is default value",
51
48
  // inputLabel: "Text Field",
52
49
  // padding: 10
53
50
  };
54
51
 
55
- export const Dark = Template.bind({});
56
- Dark.args = {
57
- showText: true,
58
- buttonLabel: "test",
59
- borderRadius: 5,
60
- buttonColor: "#878787",
61
- textColor: "#ffffff",
62
- icon: <CastIcon />
52
+ export const IconOnly = Template.bind({});
53
+ IconOnly.args = {
54
+ // showText: true,
55
+ // buttonLabel: "test",
56
+ // borderRadius: 5,
57
+ // buttonColor: "#878787",
58
+ // textColor: "#ffffff",
59
+ // icon: <CastIcon />,
60
+ theme: "primary"
61
+
63
62
  // placeholder: "Exemple ...",
64
63
  // defaultValue: "This is default value",
65
64
  // inputLabel: "Text Field",
@@ -67,12 +66,14 @@ Dark.args = {
67
66
  };
68
67
  export const Danger = Template.bind({});
69
68
  Danger.args = {
70
- showText: true,
71
- buttonLabel: "test",
72
- borderRadius: 5,
73
- buttonColor: "#c0c0c0",
74
- danger: true,
75
- icon: <CastIcon />
69
+ // showText: true,
70
+ // buttonLabel: "test",
71
+ // borderRadius: 5,
72
+ // buttonColor: "#c0c0c0",
73
+ // danger: true,
74
+ // icon: <CastIcon />,
75
+ theme: "primary"
76
+
76
77
  // placeholder: "Exemple ...",
77
78
  // defaultValue: "This is default value",
78
79
  // inputLabel: "Text Field",
@@ -5,28 +5,15 @@ import { HawaAlert } from "../../ui";
5
5
 
6
6
  const Template = (args) => {
7
7
  return (
8
- <HawaProvider theme={{ ...defaultTheme }}>
8
+ <HawaProvider themeName={args.theme}>
9
9
  <HawaAlert
10
- themeType={args.theme}
11
10
  title="What?"
12
11
  text="This is a success alert"
13
12
  severity="success"
14
13
  />
15
- <HawaAlert
16
- themeType={args.theme}
17
- text="This is an info alert"
18
- severity="info"
19
- />
20
- <HawaAlert
21
- themeType={args.theme}
22
- text="This is a warning alert"
23
- severity="warning"
24
- />
25
- <HawaAlert
26
- themeType={args.theme}
27
- text="This is an error alert"
28
- severity="error"
29
- />
14
+ <HawaAlert text="This is an info alert" severity="info" />
15
+ <HawaAlert text="This is a warning alert" severity="warning" />
16
+ <HawaAlert text="This is an error alert" severity="error" />
30
17
  </HawaProvider>
31
18
  );
32
19
  };
@@ -0,0 +1,90 @@
1
+ import React from "react";
2
+ import { HawaProvider } from "../../themes/HawaProvider";
3
+ import { ActionButton, HawaLogoButton } from "../../ui";
4
+
5
+ export default {
6
+ title: "Elements/Buttons/LogoButtons",
7
+ component: ActionButton,
8
+ argTypes: {
9
+ theme: {
10
+ options: ["primary", "secondary", "default"],
11
+ control: { type: "select" }
12
+ },
13
+ buttonLabel: { control: "text" },
14
+ logo: { control: "text" }
15
+ },
16
+ args: {
17
+ buttonLabel: "test",
18
+ logo: "google",
19
+ theme: "primary"
20
+ }
21
+ };
22
+ const Template = (args) => {
23
+ return (
24
+ <HawaProvider themeName={args.theme}>
25
+ <HawaLogoButton logo={args.logo} buttonText={args.buttonLabel} />
26
+ </HawaProvider>
27
+ );
28
+ };
29
+
30
+ export const Google = Template.bind({});
31
+ Google.args = {
32
+ buttonLabel: "Sign in via Google",
33
+ logo: "google",
34
+ theme: "primary"
35
+ };
36
+
37
+ export const Twitter = Template.bind({});
38
+ Twitter.args = {
39
+ buttonLabel: "Sign in via Twitter",
40
+ logo: "twitter",
41
+ theme: "primary"
42
+ };
43
+ export const Github = Template.bind({});
44
+ Github.args = {
45
+ buttonLabel: "Sign in via Github",
46
+ logo: "github",
47
+ theme: "primary"
48
+ };
49
+ export const WalletPay = Template.bind({});
50
+ WalletPay.args = {
51
+ buttonLabel: "Pay with Wallet",
52
+ logo: "wallet",
53
+ theme: "primary"
54
+ };
55
+ export const GooglePay = Template.bind({});
56
+ GooglePay.args = {
57
+ buttonLabel: "Google Pay",
58
+ logo: "googlepay",
59
+ theme: "primary"
60
+ };
61
+ export const ApplePay = Template.bind({});
62
+ ApplePay.args = {
63
+ buttonLabel: "Apple Pay",
64
+ logo: "applepay",
65
+ theme: "primary"
66
+ };
67
+ export const STCPay = Template.bind({});
68
+ STCPay.args = {
69
+ buttonLabel: "STC Pay",
70
+ logo: "stcpay",
71
+ theme: "primary"
72
+ };
73
+ export const VisaMasterPay = Template.bind({});
74
+ VisaMasterPay.args = {
75
+ buttonLabel: "Visa / Mastercard",
76
+ logo: "visa/master",
77
+ theme: "primary"
78
+ };
79
+ export const PayPal = Template.bind({});
80
+ PayPal.args = {
81
+ buttonLabel: "PayPal",
82
+ logo: "paypal",
83
+ theme: "primary"
84
+ };
85
+ export const Mada = Template.bind({});
86
+ Mada.args = {
87
+ buttonLabel: "Mada",
88
+ logo: "mada",
89
+ theme: "primary"
90
+ };