@sikka/hawa 0.0.10 → 0.0.11
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.
- package/es/index.es.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +3 -2
- package/src/blocks/Account/UserProfile.js +55 -50
- package/src/blocks/Account/UserSettings.js +0 -1
- package/src/blocks/AuthForms/NewPasswordForm.js +57 -85
- package/src/blocks/AuthForms/ResetPasswordForm.js +43 -42
- package/src/blocks/AuthForms/SignInForm.js +92 -95
- package/src/blocks/AuthForms/SignUpForm.js +105 -104
- package/src/blocks/Payment/PaymentMethod.js +0 -1
- package/src/blocks/Payment/SelectPayment.js +53 -54
- package/src/index.js +0 -2
- package/src/layout/Box.js +36 -33
- package/src/stories/BlocksStories/AuthForm.stories.js +105 -39
- package/src/stories/BlocksStories/PaymentForm.stories.js +20 -35
- package/src/stories/BlocksStories/UserForm.stories.js +2 -16
- package/src/stories/LayoutStories/Box.stories.js +4 -10
- package/src/stories/UIStories/ActionButton.stories.js +1 -6
- package/src/stories/UIStories/AdaptiveButton.stories.js +1 -6
- package/src/stories/UIStories/Alert.stories.js +2 -3
- package/src/stories/UIStories/LogoButtons.stories.js +2 -6
- package/src/stories/UIStories/RadioSelector.stories.js +0 -3
- package/src/stories/UIStories/SettingsRow.stories.js +3 -16
- package/src/themes/HawaProvider.js +187 -178
- package/src/themes/QawaimTheme.js +199 -0
- package/src/ui/ActionButton.js +32 -35
- package/src/ui/AdaptiveButton.js +3 -8
- package/src/ui/HawaAlert.js +22 -24
- package/src/ui/HawaButton.js +43 -44
- package/src/ui/HawaInputLabel.js +22 -23
- package/src/ui/HawaLogoButton.js +7 -45
- package/src/ui/HawaRadio.js +23 -32
- package/src/ui/HawaSettingsRow.js +1 -27
- package/src/ui/HawaTextArea.js +1 -1
- package/src/ui/HawaTextField.js +146 -93
- package/src/ui/HawaTypography.js +19 -21
- package/src/ui/Row.js +1 -1
- package/src/ui/StyledTooltip.js +1 -1
- package/src/ui/TabPanel.js +1 -1
- package/storybook-static/8.1bf48ea7.iframe.bundle.js +1 -0
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/main.b00949db.iframe.bundle.js +1 -0
- package/storybook-static/{runtime~main.cfefe972.iframe.bundle.js → runtime~main.f1ebae9b.iframe.bundle.js} +1 -1
- package/storybook-static/vendors~main.f8d30727.iframe.bundle.js +76 -0
- package/storybook-static/{vendors~main.aa1d952a.iframe.bundle.js.LICENSE.txt → vendors~main.f8d30727.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/vendors~main.f8d30727.iframe.bundle.js.map +1 -0
- package/src/stories/HawaProvider.stories.js +0 -22
- package/storybook-static/8.c4cb6081.iframe.bundle.js +0 -1
- package/storybook-static/main.5731dbe3.iframe.bundle.js +0 -1
- package/storybook-static/vendors~main.aa1d952a.iframe.bundle.js +0 -76
- package/storybook-static/vendors~main.aa1d952a.iframe.bundle.js.map +0 -1
package/src/layout/Box.js
CHANGED
|
@@ -1,38 +1,41 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import { ThemeProvider } from "../themes/HawaProvider";
|
|
1
|
+
import React from "react";
|
|
3
2
|
|
|
4
3
|
export const Box = (props) => {
|
|
5
|
-
|
|
6
|
-
let boxStyle = {};
|
|
4
|
+
// let boxStyle = {};
|
|
7
5
|
|
|
8
|
-
let currentTheme = Object.keys(hawaTheme.layout).find(
|
|
9
|
-
|
|
10
|
-
);
|
|
11
|
-
if (currentTheme) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
} else {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
6
|
+
// let currentTheme = Object.keys(hawaTheme.layout).find(
|
|
7
|
+
// (tName) => tName.toLowerCase() === themeName?.toLowerCase()
|
|
8
|
+
// );
|
|
9
|
+
// if (currentTheme) {
|
|
10
|
+
// boxStyle = {
|
|
11
|
+
// display: "flex",
|
|
12
|
+
// flexDirection: props.horizontal ? "row" : "column",
|
|
13
|
+
// ...hawaTheme?.layout[currentTheme],
|
|
14
|
+
// backgroundColor: props.noColor
|
|
15
|
+
// ? "none"
|
|
16
|
+
// : hawaTheme.layout[currentTheme].backgroundColor,
|
|
17
|
+
// padding: props.noPadding ? 0 : hawaTheme?.layout[currentTheme].padding,
|
|
18
|
+
// margin: props.noMargin ? 0 : hawaTheme?.layout[currentTheme].margin,
|
|
19
|
+
// maxWidth: props.maxWidth
|
|
20
|
+
// };
|
|
21
|
+
// } else {
|
|
22
|
+
// boxStyle = {
|
|
23
|
+
// display: "flex",
|
|
24
|
+
// flexDirection: props.horizontal ? "row" : "column",
|
|
25
|
+
// color: "white",
|
|
26
|
+
// marginTop: props.last ? 10 * 2 : 0,
|
|
27
|
+
// backgroundColor: props.noColor ? "none" : "lightGrey",
|
|
28
|
+
// padding: props.noPadding ? 0 : 10,
|
|
29
|
+
// margin: props.noMargin ? 0 : 10,
|
|
30
|
+
// maxWidth: props.maxWidth,
|
|
31
|
+
// };
|
|
32
|
+
// }
|
|
36
33
|
|
|
37
|
-
return
|
|
34
|
+
return (
|
|
35
|
+
<div
|
|
36
|
+
// style={boxStyle}
|
|
37
|
+
>
|
|
38
|
+
{props.children}
|
|
39
|
+
</div>
|
|
40
|
+
);
|
|
38
41
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ThemeProvider } from "@mui/material";
|
|
1
2
|
import React from "react";
|
|
2
3
|
import {
|
|
3
4
|
NewPasswordForm,
|
|
@@ -5,7 +6,6 @@ import {
|
|
|
5
6
|
SignInForm,
|
|
6
7
|
SignUpForm
|
|
7
8
|
} from "../../blocks/AuthForms";
|
|
8
|
-
import { HawaProvider } from "../../themes/HawaProvider";
|
|
9
9
|
|
|
10
10
|
export default {
|
|
11
11
|
title: "Blocks/AuthBlocks",
|
|
@@ -20,22 +20,35 @@ export default {
|
|
|
20
20
|
|
|
21
21
|
const SignInTemplate = (args) => {
|
|
22
22
|
return (
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
23
|
+
<SignInForm
|
|
24
|
+
{...args}
|
|
25
|
+
error={args.showError}
|
|
26
|
+
texts={{
|
|
27
|
+
emailLabel: "Email",
|
|
28
|
+
emailPlaceholder: "Enter your email",
|
|
29
|
+
emailRequiredText: "Email is required",
|
|
30
|
+
emailInvalidText: "Invalid email address",
|
|
31
|
+
passwordLabel: "Password",
|
|
32
|
+
passwordPlaceholder: "Enter password",
|
|
33
|
+
passwordRequiredText: "Password is required",
|
|
34
|
+
forgotPasswordText: "Forgot password?",
|
|
35
|
+
newUserText: "New user?",
|
|
36
|
+
signUpText: "Sign up",
|
|
37
|
+
signInText: "Sign in",
|
|
38
|
+
googleButtonLabel: "Sign in with Google",
|
|
39
|
+
githubButtonLabel: "Sign in with Github",
|
|
40
|
+
twitterButtonLabel: "Sign in with Twitter"
|
|
41
|
+
}}
|
|
42
|
+
handleSignIn={(e) => console.log("singing in via email", e)}
|
|
43
|
+
handleForgotPassword={() => console.log("user forgot password")}
|
|
44
|
+
handleGoogleSignIn={() => console.log("signing in via google")}
|
|
45
|
+
handleGithubSignIn={() => console.log("signing in via github")}
|
|
46
|
+
handleTwitterSignIn={() => console.log("signing in via Twitter")}
|
|
47
|
+
handleRouteToSignUp={() => console.log("switching to sign up")}
|
|
48
|
+
viaGoogle={args.viaGoogle}
|
|
49
|
+
viaGithub={args.viaGithub}
|
|
50
|
+
viaTwitter={args.viaTwitter}
|
|
51
|
+
/>
|
|
39
52
|
);
|
|
40
53
|
};
|
|
41
54
|
|
|
@@ -50,22 +63,37 @@ SignIn.args = {
|
|
|
50
63
|
|
|
51
64
|
const SignUpTemplate = (args) => {
|
|
52
65
|
return (
|
|
53
|
-
<
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
<SignUpForm
|
|
67
|
+
{...args}
|
|
68
|
+
texts={{
|
|
69
|
+
fullNameLabel: "Full Name",
|
|
70
|
+
fullNamePlaceholder: "Fulan AlFulani",
|
|
71
|
+
emailLabel: "Email",
|
|
72
|
+
emailPlaceholder: "Enter your email",
|
|
73
|
+
emailRequiredText: "Email is required",
|
|
74
|
+
emailInvalidText: "Invalid email address",
|
|
75
|
+
passwordLabel: "Password",
|
|
76
|
+
passwordPlaceholder: "Minimum 8 characters",
|
|
77
|
+
passwordRequiredText: "Password is required",
|
|
78
|
+
passwordTooShortText: "Password too short",
|
|
79
|
+
forgotPasswordText: "Forgot password?",
|
|
80
|
+
newUserText: "New user?",
|
|
81
|
+
signUpText: "Sign up",
|
|
82
|
+
signInText: "Sign in",
|
|
83
|
+
googleButtonLabel: "Sign in with Google",
|
|
84
|
+
githubButtonLabel: "Sign in with Github",
|
|
85
|
+
twitterButtonLabel: "Sign in with Twitter"
|
|
86
|
+
}}
|
|
87
|
+
error={args.showError}
|
|
88
|
+
viaGoogle={args.viaGoogle}
|
|
89
|
+
viaGithub={args.viaGithub}
|
|
90
|
+
viaTwitter={args.viaTwitter}
|
|
91
|
+
handleSignUp={() => console.log("singing up via email")}
|
|
92
|
+
handleGoogleSignUp={() => console.log("signing up via google")}
|
|
93
|
+
handleGithubSignUp={() => console.log("signing up via github")}
|
|
94
|
+
handleTwitterSignUp={() => console.log("signing up via Twitter")}
|
|
95
|
+
handleRouteToSignIn={() => console.log("switching to sign in")}
|
|
96
|
+
/>
|
|
69
97
|
);
|
|
70
98
|
};
|
|
71
99
|
export const SignUp = SignUpTemplate.bind({});
|
|
@@ -79,9 +107,27 @@ SignUp.args = {
|
|
|
79
107
|
|
|
80
108
|
const ResetPasswordTemplate = (args) => {
|
|
81
109
|
return (
|
|
82
|
-
<
|
|
83
|
-
|
|
84
|
-
|
|
110
|
+
<ResetPasswordForm
|
|
111
|
+
error={args.showError}
|
|
112
|
+
texts={{
|
|
113
|
+
emailLabel: "Email",
|
|
114
|
+
emailPlaceholder: "Enter your email",
|
|
115
|
+
emailRequiredText: "Email is required",
|
|
116
|
+
emailInvalidText: "Invalid email address",
|
|
117
|
+
passwordLabel: "Password",
|
|
118
|
+
resetPassword: "Reset Password",
|
|
119
|
+
passwordRequiredText: "Password is required",
|
|
120
|
+
forgotPasswordText: "Forgot password?",
|
|
121
|
+
newUserText: "New user?",
|
|
122
|
+
signUpText: "Sign up",
|
|
123
|
+
signInText: "Sign in",
|
|
124
|
+
googleButtonLabel: "Sign in with Google",
|
|
125
|
+
githubButtonLabel: "Sign in with Github",
|
|
126
|
+
twitterButtonLabel: "Sign in with Twitter"
|
|
127
|
+
}}
|
|
128
|
+
{...args}
|
|
129
|
+
handleResetPassword={() => console.log("resetting password")}
|
|
130
|
+
/>
|
|
85
131
|
);
|
|
86
132
|
};
|
|
87
133
|
export const ResetPassword = ResetPasswordTemplate.bind({});
|
|
@@ -92,9 +138,29 @@ ResetPassword.args = {
|
|
|
92
138
|
};
|
|
93
139
|
const NewPasswordTemplate = (args) => {
|
|
94
140
|
return (
|
|
95
|
-
<
|
|
96
|
-
|
|
97
|
-
|
|
141
|
+
<NewPasswordForm
|
|
142
|
+
texts={{
|
|
143
|
+
emailLabel: "Email",
|
|
144
|
+
emailPlaceholder: "Enter your email",
|
|
145
|
+
emailRequiredText: "Email is required",
|
|
146
|
+
passwordPlaceholder: "Enter password",
|
|
147
|
+
updatePassword: "Update Password",
|
|
148
|
+
passwordRequiredText: "Password is required",
|
|
149
|
+
passwordLabel: "Choose new password",
|
|
150
|
+
confirmPasswordPlaceholder: "Confirm password",
|
|
151
|
+
confirmPasswordLabel: "Confirm",
|
|
152
|
+
forgotPasswordText: "Forgot password?",
|
|
153
|
+
newUserText: "New user?",
|
|
154
|
+
signUpText: "Sign up",
|
|
155
|
+
signInText: "Sign in",
|
|
156
|
+
googleButtonLabel: "Sign in with Google",
|
|
157
|
+
githubButtonLabel: "Sign in with Github",
|
|
158
|
+
twitterButtonLabel: "Sign in with Twitter"
|
|
159
|
+
}}
|
|
160
|
+
error={args.showError}
|
|
161
|
+
theme={args.theme}
|
|
162
|
+
{...args}
|
|
163
|
+
/>
|
|
98
164
|
);
|
|
99
165
|
};
|
|
100
166
|
export const NewPassword = NewPasswordTemplate.bind({});
|
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
ChargeWalletForm,
|
|
6
6
|
PayWithWallet
|
|
7
7
|
} from "../../blocks/Payment";
|
|
8
|
-
import { defaultTheme, HawaProvider } from "../../themes/HawaProvider";
|
|
9
8
|
|
|
10
9
|
export default {
|
|
11
10
|
title: "Blocks/PaymentBlocks",
|
|
@@ -36,49 +35,35 @@ export default {
|
|
|
36
35
|
|
|
37
36
|
export const PaymentSelection = (args) => {
|
|
38
37
|
return (
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
/>
|
|
57
|
-
</HawaProvider>
|
|
38
|
+
<SelectPayment
|
|
39
|
+
{...args}
|
|
40
|
+
walletLabel="Wallet Balance"
|
|
41
|
+
handleWallet={() => console.log("paying via wallet")}
|
|
42
|
+
visaMasterLabel="Credit Card"
|
|
43
|
+
handleCreditCard={() => console.log("paying via Credit Card")}
|
|
44
|
+
madaLabel="Mada"
|
|
45
|
+
handleMada={() => console.log("paying via Mada")}
|
|
46
|
+
paypalLabel="PayPal"
|
|
47
|
+
handlePayPal={() => console.log("paying via PayPal")}
|
|
48
|
+
applePayLabel="Apple Pay"
|
|
49
|
+
handleApplePay={() => console.log("paying via Apple Pay")}
|
|
50
|
+
googlePayLabel="Google Pay"
|
|
51
|
+
handleGooglePay={() => console.log("paying via Google Pay")}
|
|
52
|
+
stcPayLabel="STC Pay"
|
|
53
|
+
handleSTCPay={() => console.log("paying via STC Pay")}
|
|
54
|
+
/>
|
|
58
55
|
);
|
|
59
56
|
};
|
|
60
57
|
|
|
61
58
|
export const PayViaWallet = (args) => {
|
|
62
|
-
return
|
|
63
|
-
<HawaProvider theme={{ ...defaultTheme }}>
|
|
64
|
-
<PayWithWallet theme={args.theme} />
|
|
65
|
-
</HawaProvider>
|
|
66
|
-
);
|
|
59
|
+
return <PayWithWallet theme={args.theme} />;
|
|
67
60
|
};
|
|
68
61
|
export const PayViaCreditCard = (args) => {
|
|
69
|
-
return
|
|
70
|
-
<HawaProvider theme={{ ...defaultTheme }}>
|
|
71
|
-
<CreditCardForm />
|
|
72
|
-
</HawaProvider>
|
|
73
|
-
);
|
|
62
|
+
return <CreditCardForm />;
|
|
74
63
|
};
|
|
75
64
|
|
|
76
65
|
export const ChargeWallet = (args) => {
|
|
77
|
-
return
|
|
78
|
-
<HawaProvider themeName={args.theme}>
|
|
79
|
-
<ChargeWalletForm currency="SAR" />
|
|
80
|
-
</HawaProvider>
|
|
81
|
-
);
|
|
66
|
+
return <ChargeWalletForm currency="SAR" />;
|
|
82
67
|
};
|
|
83
68
|
|
|
84
69
|
ChargeWallet.args = {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { UserProfile } from "../../blocks/Account";
|
|
3
|
-
import { defaultTheme, HawaProvider } from "../../themes/HawaProvider";
|
|
4
3
|
|
|
5
4
|
export default {
|
|
6
5
|
title: "Blocks/UserBlocks",
|
|
@@ -13,28 +12,15 @@ export default {
|
|
|
13
12
|
}
|
|
14
13
|
};
|
|
15
14
|
|
|
16
|
-
const theme = {
|
|
17
|
-
...defaultTheme,
|
|
18
|
-
paddings: 20
|
|
19
|
-
};
|
|
20
|
-
|
|
21
15
|
export const UserAccount = (args) => {
|
|
22
|
-
return
|
|
23
|
-
<HawaProvider theme={{ ...defaultTheme, ...theme }}>
|
|
24
|
-
<UserProfile {...args} />
|
|
25
|
-
</HawaProvider>
|
|
26
|
-
);
|
|
16
|
+
return <UserProfile {...args} />;
|
|
27
17
|
};
|
|
28
18
|
|
|
29
19
|
UserAccount.args = {
|
|
30
20
|
theme: "primary"
|
|
31
21
|
};
|
|
32
22
|
export const UserSettings = (args) => {
|
|
33
|
-
return
|
|
34
|
-
<HawaProvider theme={{ ...defaultTheme, ...theme }}>
|
|
35
|
-
<UserProfile {...args} />
|
|
36
|
-
</HawaProvider>
|
|
37
|
-
);
|
|
23
|
+
return <UserProfile {...args} />;
|
|
38
24
|
};
|
|
39
25
|
UserSettings.args = {
|
|
40
26
|
theme: "primary"
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Box } from "../../layout";
|
|
3
|
-
import { HawaProvider, defaultTheme } from "../../themes/HawaProvider";
|
|
4
|
-
const theme = {
|
|
5
|
-
...defaultTheme
|
|
6
|
-
};
|
|
7
3
|
|
|
8
4
|
const Template = (args) => {
|
|
9
5
|
return (
|
|
10
|
-
|
|
6
|
+
<>
|
|
11
7
|
<Box>Box 1</Box>
|
|
12
8
|
<Box>
|
|
13
9
|
<div style={{ backgroundColor: "white", padding: 10, color: "black" }}>
|
|
@@ -15,7 +11,7 @@ const Template = (args) => {
|
|
|
15
11
|
</div>
|
|
16
12
|
</Box>
|
|
17
13
|
<Box>Box 3</Box>
|
|
18
|
-
|
|
14
|
+
</>
|
|
19
15
|
);
|
|
20
16
|
};
|
|
21
17
|
export default {
|
|
@@ -37,8 +33,7 @@ Normal.args = {
|
|
|
37
33
|
size: "large",
|
|
38
34
|
showText: true,
|
|
39
35
|
buttonLabel: "test",
|
|
40
|
-
|
|
41
|
-
padding: theme.paddings,
|
|
36
|
+
// padding: theme.paddings,
|
|
42
37
|
textColor: "#000000",
|
|
43
38
|
buttonColor: "#f9f9f9"
|
|
44
39
|
};
|
|
@@ -48,8 +43,7 @@ Compact.args = {
|
|
|
48
43
|
showText: true,
|
|
49
44
|
buttonLabel: "test",
|
|
50
45
|
theme: {
|
|
51
|
-
|
|
52
|
-
paddings: theme.paddings / 2,
|
|
46
|
+
// paddings: theme.paddings / 2,
|
|
53
47
|
textColor: "#000000",
|
|
54
48
|
buttonColor: "#f9f9f9"
|
|
55
49
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { HawaProvider } from "../../themes/HawaProvider";
|
|
3
2
|
import { ActionButton } from "../../ui";
|
|
4
3
|
|
|
5
4
|
export default {
|
|
@@ -13,11 +12,7 @@ export default {
|
|
|
13
12
|
}
|
|
14
13
|
};
|
|
15
14
|
const Template = (args) => {
|
|
16
|
-
return
|
|
17
|
-
<HawaProvider themeName={args.theme}>
|
|
18
|
-
<ActionButton text={args.buttonLabel} />
|
|
19
|
-
</HawaProvider>
|
|
20
|
-
);
|
|
15
|
+
return <ActionButton text={args.buttonLabel} />;
|
|
21
16
|
};
|
|
22
17
|
|
|
23
18
|
Template.args = {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import CastIcon from "@mui/icons-material/Cast";
|
|
3
|
-
import { HawaProvider } from "../../themes/HawaProvider";
|
|
4
3
|
import { AdaptiveButton } from "../../ui";
|
|
5
4
|
|
|
6
5
|
export default {
|
|
@@ -27,11 +26,7 @@ export default {
|
|
|
27
26
|
};
|
|
28
27
|
|
|
29
28
|
const Template = (args) => {
|
|
30
|
-
return
|
|
31
|
-
<HawaProvider themeName={args.theme}>
|
|
32
|
-
<AdaptiveButton {...args} />
|
|
33
|
-
</HawaProvider>
|
|
34
|
-
);
|
|
29
|
+
return <AdaptiveButton {...args} />;
|
|
35
30
|
};
|
|
36
31
|
|
|
37
32
|
export const FullButton = Template.bind({});
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
-
import { defaultTheme, HawaProvider } from "../../themes/HawaProvider";
|
|
4
3
|
import { HawaAlert } from "../../ui";
|
|
5
4
|
|
|
6
5
|
const Template = (args) => {
|
|
7
6
|
return (
|
|
8
|
-
|
|
7
|
+
<>
|
|
9
8
|
<HawaAlert
|
|
10
9
|
title="What?"
|
|
11
10
|
text="This is a success alert"
|
|
@@ -14,7 +13,7 @@ const Template = (args) => {
|
|
|
14
13
|
<HawaAlert text="This is an info alert" severity="info" />
|
|
15
14
|
<HawaAlert text="This is a warning alert" severity="warning" />
|
|
16
15
|
<HawaAlert text="This is an error alert" severity="error" />
|
|
17
|
-
|
|
16
|
+
</>
|
|
18
17
|
);
|
|
19
18
|
};
|
|
20
19
|
//types:
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { HawaProvider } from "../../themes/HawaProvider";
|
|
3
2
|
import { ActionButton, HawaLogoButton } from "../../ui";
|
|
4
3
|
|
|
5
4
|
export default {
|
|
@@ -19,12 +18,9 @@ export default {
|
|
|
19
18
|
theme: "primary"
|
|
20
19
|
}
|
|
21
20
|
};
|
|
21
|
+
|
|
22
22
|
const Template = (args) => {
|
|
23
|
-
return
|
|
24
|
-
<HawaProvider themeName={args.theme}>
|
|
25
|
-
<HawaLogoButton logo={args.logo} buttonText={args.buttonLabel} />
|
|
26
|
-
</HawaProvider>
|
|
27
|
-
);
|
|
23
|
+
return <HawaLogoButton logo={args.logo} buttonText={args.buttonLabel} />;
|
|
28
24
|
};
|
|
29
25
|
|
|
30
26
|
export const Google = Template.bind({});
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { HawaProvider } from "../../themes/HawaProvider";
|
|
3
2
|
import { HawaRadio } from "../../ui";
|
|
4
3
|
|
|
5
4
|
export default {
|
|
@@ -18,7 +17,6 @@ export default {
|
|
|
18
17
|
|
|
19
18
|
const Template = (args) => {
|
|
20
19
|
return (
|
|
21
|
-
<HawaProvider themeName={args.theme}>
|
|
22
20
|
<HawaRadio
|
|
23
21
|
defaultValue="option1"
|
|
24
22
|
options={[
|
|
@@ -27,7 +25,6 @@ const Template = (args) => {
|
|
|
27
25
|
{ text: "Option 3", label: "option3" }
|
|
28
26
|
]}
|
|
29
27
|
/>
|
|
30
|
-
</HawaProvider>
|
|
31
28
|
);
|
|
32
29
|
};
|
|
33
30
|
export const Light = Template.bind({});
|
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
ChargeWalletForm,
|
|
6
6
|
PayWithWallet
|
|
7
7
|
} from "../../blocks/Payment";
|
|
8
|
-
import { defaultTheme, HawaProvider } from "../../themes/HawaProvider";
|
|
9
8
|
import { HawaSettingsRow } from "../../ui";
|
|
10
9
|
|
|
11
10
|
export default {
|
|
@@ -28,11 +27,7 @@ export default {
|
|
|
28
27
|
};
|
|
29
28
|
|
|
30
29
|
const HawaSettingsRowTemplate = (args) => {
|
|
31
|
-
return
|
|
32
|
-
<HawaProvider themeName={args.theme}>
|
|
33
|
-
<HawaSettingsRow settingsType={args.type} />
|
|
34
|
-
</HawaProvider>
|
|
35
|
-
);
|
|
30
|
+
return <HawaSettingsRow settingsType={args.type} />;
|
|
36
31
|
};
|
|
37
32
|
|
|
38
33
|
export const Checkbox = HawaSettingsRowTemplate.bind({});
|
|
@@ -41,22 +36,14 @@ Checkbox.args = {
|
|
|
41
36
|
type: "checkbox"
|
|
42
37
|
};
|
|
43
38
|
export const Text = (args) => {
|
|
44
|
-
return
|
|
45
|
-
<HawaProvider themeName={args.theme}>
|
|
46
|
-
<HawaSettingsRow settingsType={args.type} />
|
|
47
|
-
</HawaProvider>
|
|
48
|
-
);
|
|
39
|
+
return <HawaSettingsRow settingsType={args.type} />;
|
|
49
40
|
};
|
|
50
41
|
Text.args = {
|
|
51
42
|
theme: "primary",
|
|
52
43
|
type: "text"
|
|
53
44
|
};
|
|
54
45
|
export const Radio = (args) => {
|
|
55
|
-
return
|
|
56
|
-
<HawaProvider themeName={args.theme}>
|
|
57
|
-
<HawaSettingsRow settingsType={args.type} />
|
|
58
|
-
</HawaProvider>
|
|
59
|
-
);
|
|
46
|
+
return <HawaSettingsRow settingsType={args.type} />;
|
|
60
47
|
};
|
|
61
48
|
Radio.args = {
|
|
62
49
|
theme: "primary",
|