@sikka/hawa 0.0.8 → 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 -1
- 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 +25 -34
- 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
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
HawaTextField,
|
|
4
|
-
ActionButton,
|
|
5
|
-
HawaAlert,
|
|
6
|
-
HawaTypography,
|
|
7
|
-
HawaLogoButton
|
|
8
|
-
} from "../../ui";
|
|
9
|
-
import { Box } from "../../layout";
|
|
2
|
+
import { HawaTextField, HawaTypography, HawaLogoButton } from "../../ui";
|
|
10
3
|
import { FormProvider, useForm } from "react-hook-form";
|
|
11
|
-
|
|
12
4
|
import InputAdornment from "@mui/material/InputAdornment";
|
|
13
5
|
import EmailIcon from "@mui/icons-material/MailOutline";
|
|
14
6
|
import PasswordIcon from "@mui/icons-material/HttpsOutlined";
|
|
7
|
+
import Container from "@mui/material/Container";
|
|
8
|
+
import Button from "@mui/material/Button";
|
|
9
|
+
import Alert from "@mui/material/Alert";
|
|
15
10
|
|
|
16
11
|
export const SignInForm = (props) => {
|
|
17
12
|
const methods = useForm();
|
|
@@ -21,69 +16,69 @@ export const SignInForm = (props) => {
|
|
|
21
16
|
} = methods;
|
|
22
17
|
|
|
23
18
|
return (
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
19
|
+
<Container maxWidth="xs" variant="auth">
|
|
20
|
+
{props.error && (
|
|
21
|
+
<Alert severity="error">
|
|
22
|
+
{props.errorTitle && <AlertTitle>{props.errorTitle}</AlertTitle>}
|
|
23
|
+
{props.errorText}
|
|
24
|
+
</Alert>
|
|
25
|
+
)}
|
|
26
|
+
<FormProvider {...methods}>
|
|
27
|
+
<form onSubmit={handleSubmit(props.handleSignIn)}>
|
|
28
|
+
<HawaTextField
|
|
29
|
+
fullWidth
|
|
30
|
+
type="text"
|
|
31
|
+
name="email"
|
|
32
|
+
label={props.texts.emailLabel}
|
|
33
|
+
placeholder={props.texts.emailPlaceholder}
|
|
34
|
+
startAdornment={
|
|
35
|
+
<InputAdornment position="start">
|
|
36
|
+
<EmailIcon />
|
|
37
|
+
</InputAdornment>
|
|
38
|
+
}
|
|
39
|
+
rules={{
|
|
40
|
+
required: props.texts.emailRequired,
|
|
41
|
+
pattern: {
|
|
42
|
+
value:
|
|
43
|
+
/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
|
|
44
|
+
message: props.texts.emailInvalidText
|
|
40
45
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
value:
|
|
45
|
-
/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
|
|
46
|
-
message: "Invalid email address"
|
|
47
|
-
}
|
|
48
|
-
}}
|
|
49
|
-
helperText={errors.email?.message}
|
|
50
|
-
/>
|
|
46
|
+
}}
|
|
47
|
+
helperText={errors.email?.message}
|
|
48
|
+
/>
|
|
51
49
|
|
|
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
|
-
</form>
|
|
85
|
-
</FormProvider>
|
|
86
|
-
</Box>
|
|
50
|
+
<HawaTextField
|
|
51
|
+
fullWidth
|
|
52
|
+
name="password"
|
|
53
|
+
placeholder={props.texts.passwordPlaceholder}
|
|
54
|
+
type="password"
|
|
55
|
+
label={props.texts.passwordLabel}
|
|
56
|
+
startAdornment={
|
|
57
|
+
<InputAdornment position="start">
|
|
58
|
+
<PasswordIcon />
|
|
59
|
+
</InputAdornment>
|
|
60
|
+
}
|
|
61
|
+
rules={{
|
|
62
|
+
required: props.texts.passwordRequired
|
|
63
|
+
}}
|
|
64
|
+
helperText={errors.password?.message}
|
|
65
|
+
/>
|
|
66
|
+
<HawaTypography
|
|
67
|
+
style={{
|
|
68
|
+
cursor: "pointer",
|
|
69
|
+
marginTop: 5,
|
|
70
|
+
width: "max-content",
|
|
71
|
+
padding: 5
|
|
72
|
+
}}
|
|
73
|
+
onClick={props.handleForgotPassword}
|
|
74
|
+
>
|
|
75
|
+
{props.texts.forgotPasswordText}
|
|
76
|
+
</HawaTypography>
|
|
77
|
+
<Button type="submit" fullWidth variant="last">
|
|
78
|
+
{props.texts.signInText}
|
|
79
|
+
</Button>
|
|
80
|
+
</form>
|
|
81
|
+
</FormProvider>
|
|
87
82
|
<HawaTypography
|
|
88
83
|
style={{
|
|
89
84
|
marginTop: 5,
|
|
@@ -92,39 +87,41 @@ export const SignInForm = (props) => {
|
|
|
92
87
|
padding: 5
|
|
93
88
|
}}
|
|
94
89
|
>
|
|
95
|
-
|
|
90
|
+
{props.texts.newUserText}{" "}
|
|
96
91
|
<span
|
|
97
|
-
onClick={
|
|
92
|
+
onClick={props.handleRouteToSignUp}
|
|
98
93
|
style={{
|
|
99
94
|
cursor: "pointer",
|
|
100
95
|
color: "blue",
|
|
101
96
|
textAlign: "center"
|
|
102
97
|
}}
|
|
103
98
|
>
|
|
104
|
-
|
|
99
|
+
{props.texts.signUpText}
|
|
105
100
|
</span>
|
|
106
101
|
</HawaTypography>
|
|
107
|
-
{
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
102
|
+
<div style={{ display: "flex", flexDirection: "column" }}>
|
|
103
|
+
{props.viaGoogle && (
|
|
104
|
+
<HawaLogoButton
|
|
105
|
+
logo="google"
|
|
106
|
+
buttonText={props.texts.googleButtonLabel}
|
|
107
|
+
onClick={props.handleGoogleSignIn}
|
|
108
|
+
/>
|
|
109
|
+
)}
|
|
110
|
+
{props.viaGithub && (
|
|
111
|
+
<HawaLogoButton
|
|
112
|
+
logo="github"
|
|
113
|
+
buttonText={props.texts.githubButtonLabel}
|
|
114
|
+
onClick={props.handleGithubSignIn}
|
|
115
|
+
/>
|
|
116
|
+
)}
|
|
117
|
+
{props.viaTwitter && (
|
|
118
|
+
<HawaLogoButton
|
|
119
|
+
logo="twitter"
|
|
120
|
+
buttonText={props.texts.twitterButtonLabel}
|
|
121
|
+
onClick={props.handleTwitterSignIn}
|
|
122
|
+
/>
|
|
123
|
+
)}
|
|
124
|
+
</div>
|
|
125
|
+
</Container>
|
|
129
126
|
);
|
|
130
127
|
};
|
|
@@ -1,142 +1,143 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
HawaTextField,
|
|
5
|
-
ActionButton,
|
|
6
|
-
HawaAlert,
|
|
7
|
-
HawaTypography,
|
|
8
|
-
HawaLogoButton
|
|
9
|
-
} from "../../ui";
|
|
2
|
+
import { HawaTextField, HawaLogoButton } from "../../ui";
|
|
10
3
|
import PropTypes from "prop-types";
|
|
11
4
|
import { FormProvider, useForm } from "react-hook-form";
|
|
12
|
-
|
|
13
5
|
import PersonIcon from "@mui/icons-material/PermIdentityOutlined";
|
|
14
6
|
import InputAdornment from "@mui/material/InputAdornment";
|
|
15
7
|
import EmailIcon from "@mui/icons-material/MailOutline";
|
|
16
8
|
import PasswordIcon from "@mui/icons-material/HttpsOutlined";
|
|
9
|
+
import Container from "@mui/material/Container";
|
|
10
|
+
import Typography from "@mui/material/Typography";
|
|
11
|
+
import Button from "@mui/material/Button";
|
|
12
|
+
import Alert from "@mui/material/Alert";
|
|
17
13
|
|
|
18
14
|
export const SignUpForm = (props) => {
|
|
19
15
|
const methods = useForm();
|
|
20
16
|
const {
|
|
21
17
|
formState: { errors },
|
|
22
|
-
handleSubmit
|
|
23
|
-
getValues,
|
|
24
|
-
register,
|
|
25
|
-
watch,
|
|
26
|
-
reset,
|
|
27
|
-
setValue
|
|
18
|
+
handleSubmit
|
|
28
19
|
} = methods;
|
|
29
20
|
|
|
30
21
|
return (
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
<Container maxWidth="xs" variant="auth">
|
|
23
|
+
{props.error && (
|
|
24
|
+
<Alert severity="error">
|
|
25
|
+
{props.errorTitle && <AlertTitle>{props.errorTitle}</AlertTitle>}
|
|
26
|
+
{props.errorText}
|
|
27
|
+
</Alert>
|
|
28
|
+
)}
|
|
29
|
+
{/* {props.error && (
|
|
34
30
|
<HawaAlert text="This is a sign in alert" severity="error" />
|
|
35
|
-
)}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
/>
|
|
31
|
+
)} */}
|
|
32
|
+
<FormProvider {...methods}>
|
|
33
|
+
<form onSubmit={handleSubmit(props.handleSignUp)}>
|
|
34
|
+
<HawaTextField
|
|
35
|
+
fullWidth
|
|
36
|
+
type="text"
|
|
37
|
+
label={props.texts.fullNameLabel}
|
|
38
|
+
name="fullName"
|
|
39
|
+
placeholder={props.texts.fullNamePlaceholder}
|
|
40
|
+
inputLabel={props.texts.fullNameLabel}
|
|
41
|
+
startAdornment={
|
|
42
|
+
<InputAdornment position="start">
|
|
43
|
+
<PersonIcon />
|
|
44
|
+
</InputAdornment>
|
|
45
|
+
}
|
|
46
|
+
helperText={errors.fullName?.message}
|
|
47
|
+
/>
|
|
53
48
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
49
|
+
<HawaTextField
|
|
50
|
+
fullWidth
|
|
51
|
+
type="text"
|
|
52
|
+
label={props.texts.emailLabel}
|
|
53
|
+
placeholder={props.texts.emailPlaceholder}
|
|
54
|
+
name="email"
|
|
55
|
+
startAdornment={
|
|
56
|
+
<InputAdornment position="start">
|
|
57
|
+
<EmailIcon />
|
|
58
|
+
</InputAdornment>
|
|
59
|
+
}
|
|
60
|
+
rules={{
|
|
61
|
+
required: props.texts.emailRequiredText,
|
|
62
|
+
pattern: {
|
|
63
|
+
value:
|
|
64
|
+
/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
|
|
65
|
+
message: props.texts.emailInvalidText
|
|
63
66
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
67
|
+
}}
|
|
68
|
+
helperText={errors.email?.message}
|
|
69
|
+
/>
|
|
70
|
+
<HawaTextField
|
|
71
|
+
fullWidth
|
|
72
|
+
name="password"
|
|
73
|
+
placeholder={props.texts.passwordPlaceholder}
|
|
74
|
+
type="password"
|
|
75
|
+
label={props.texts.passwordLabel}
|
|
76
|
+
startAdornment={
|
|
77
|
+
<InputAdornment position="start">
|
|
78
|
+
<PasswordIcon />
|
|
79
|
+
</InputAdornment>
|
|
80
|
+
}
|
|
81
|
+
rules={{
|
|
82
|
+
required: props.texts.passwordRequiredText,
|
|
83
|
+
minLength: {
|
|
84
|
+
value: 8,
|
|
85
|
+
message: props.texts.passwordTooShortText
|
|
83
86
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
87
|
+
}}
|
|
88
|
+
helperText={errors.password?.message}
|
|
89
|
+
/>
|
|
90
|
+
|
|
91
|
+
<Button fullWidth variant="last" type="submit">
|
|
92
|
+
{props.texts.signUpText}
|
|
93
|
+
</Button>
|
|
94
|
+
</form>
|
|
95
|
+
</FormProvider>
|
|
93
96
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
</FormProvider>
|
|
97
|
-
</Box>
|
|
98
|
-
<HawaTypography
|
|
97
|
+
<Typography
|
|
98
|
+
variant="subtitle2"
|
|
99
99
|
style={{
|
|
100
100
|
marginTop: 5,
|
|
101
|
-
// width: "max-content",
|
|
102
101
|
textAlign: "center",
|
|
103
102
|
padding: 5
|
|
104
103
|
}}
|
|
105
104
|
>
|
|
106
105
|
Existing user?{" "}
|
|
107
106
|
<span
|
|
108
|
-
onClick={
|
|
107
|
+
onClick={props.handleRouteToSignIn}
|
|
109
108
|
style={{
|
|
110
109
|
cursor: "pointer",
|
|
111
110
|
color: "blue",
|
|
112
111
|
textAlign: "center"
|
|
113
112
|
}}
|
|
114
113
|
>
|
|
115
|
-
|
|
114
|
+
{props.texts.signInText}
|
|
116
115
|
</span>
|
|
117
|
-
</
|
|
118
|
-
{
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
116
|
+
</Typography>
|
|
117
|
+
<div style={{ display: "flex", flexDirection: "column" }}>
|
|
118
|
+
{props.viaGoogle && (
|
|
119
|
+
<HawaLogoButton
|
|
120
|
+
logo="google"
|
|
121
|
+
buttonText={props.texts.googleButtonLabel}
|
|
122
|
+
onClick={props.handleGoogleSignUp}
|
|
123
|
+
/>
|
|
124
|
+
)}
|
|
125
|
+
{props.viaGithub && (
|
|
126
|
+
<HawaLogoButton
|
|
127
|
+
logo="github"
|
|
128
|
+
buttonText={props.texts.githubButtonLabel}
|
|
129
|
+
onClick={props.handleGithubSignUp}
|
|
130
|
+
/>
|
|
131
|
+
)}
|
|
132
|
+
{props.viaTwitter && (
|
|
133
|
+
<HawaLogoButton
|
|
134
|
+
logo="twitter"
|
|
135
|
+
buttonText={props.texts.twitterButtonLabel}
|
|
136
|
+
onClick={props.handleTwitterSignUp}
|
|
137
|
+
/>
|
|
138
|
+
)}
|
|
139
|
+
</div>
|
|
140
|
+
</Container>
|
|
140
141
|
);
|
|
141
142
|
};
|
|
142
143
|
|
|
@@ -2,63 +2,62 @@ import React from "react";
|
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
3
|
import { Box } from "../../layout";
|
|
4
4
|
import { HawaTextField, HawaTypography, HawaLogoButton } from "../../ui";
|
|
5
|
+
import { Container } from "@mui/material";
|
|
5
6
|
|
|
6
7
|
export const SelectPayment = (props) => {
|
|
7
8
|
return (
|
|
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
|
-
</Box>
|
|
61
|
-
</Box>
|
|
9
|
+
<Container maxWidth="xs" >
|
|
10
|
+
<HawaTypography align="center">Choose Payment Method</HawaTypography>
|
|
11
|
+
{props.viaWallet && (
|
|
12
|
+
<HawaLogoButton
|
|
13
|
+
logo="wallet"
|
|
14
|
+
buttonText={props.walletLabel}
|
|
15
|
+
onClick={props.handleWallet}
|
|
16
|
+
/>
|
|
17
|
+
)}
|
|
18
|
+
{props.viaCreditCard && (
|
|
19
|
+
<HawaLogoButton
|
|
20
|
+
logo="visa/master"
|
|
21
|
+
buttonText={props.visaMasterLabel}
|
|
22
|
+
handleClick={props.handleCreditCard}
|
|
23
|
+
/>
|
|
24
|
+
)}
|
|
25
|
+
{props.viaMada && (
|
|
26
|
+
<HawaLogoButton
|
|
27
|
+
logo="mada"
|
|
28
|
+
buttonText={props.madaLabel}
|
|
29
|
+
handleClick={props.handleMada}
|
|
30
|
+
/>
|
|
31
|
+
)}
|
|
32
|
+
{props.viaSTCPay && (
|
|
33
|
+
<HawaLogoButton
|
|
34
|
+
logo="stcpay"
|
|
35
|
+
buttonText={props.stcPayLabel}
|
|
36
|
+
handleClick={props.handleSTCPay}
|
|
37
|
+
/>
|
|
38
|
+
)}
|
|
39
|
+
{props.viaPayPal && (
|
|
40
|
+
<HawaLogoButton
|
|
41
|
+
logo="paypal"
|
|
42
|
+
buttonText={props.paypalLabel}
|
|
43
|
+
handleClick={props.handlePayPal}
|
|
44
|
+
/>
|
|
45
|
+
)}
|
|
46
|
+
{props.viaGooglePay && (
|
|
47
|
+
<HawaLogoButton
|
|
48
|
+
logo="googlepay"
|
|
49
|
+
buttonText={props.googlePayLabel}
|
|
50
|
+
handleClick={props.handleGooglePay}
|
|
51
|
+
/>
|
|
52
|
+
)}
|
|
53
|
+
{props.viaApplePay && (
|
|
54
|
+
<HawaLogoButton
|
|
55
|
+
logo="applepay"
|
|
56
|
+
buttonText={props.applePayLabel}
|
|
57
|
+
handleClick={props.handleApplePay}
|
|
58
|
+
/>
|
|
59
|
+
)}
|
|
60
|
+
</Container>
|
|
62
61
|
);
|
|
63
62
|
};
|
|
64
63
|
|
package/src/index.js
CHANGED