@sikka/hawa 0.0.9 → 0.0.12

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 (68) hide show
  1. package/es/index.es.js +1 -1
  2. package/lib/index.js +1 -1
  3. package/package.json +5 -4
  4. package/src/blocks/Account/UserProfileForm.js +80 -0
  5. package/src/blocks/Account/UserSettingsForm.js +17 -0
  6. package/src/blocks/Account/index.js +2 -2
  7. package/src/blocks/AuthForms/NewPasswordForm.js +57 -85
  8. package/src/blocks/AuthForms/ResetPasswordForm.js +43 -42
  9. package/src/blocks/AuthForms/SignInForm.js +99 -98
  10. package/src/blocks/AuthForms/SignUpForm.js +106 -104
  11. package/src/blocks/Payment/ChargeWalletForm.js +40 -37
  12. package/src/blocks/Payment/CreditCardForm.js +49 -44
  13. package/src/blocks/Payment/PayWithWallet.js +16 -6
  14. package/src/blocks/Payment/PaymentMethod.js +0 -1
  15. package/src/blocks/Payment/SelectPayment.js +53 -55
  16. package/src/index.js +0 -1
  17. package/src/layout/Box.js +36 -33
  18. package/src/stories/BlocksStories/Account/UserProfile.stories.js +21 -0
  19. package/src/stories/BlocksStories/Account/UserSettings.stories.js +21 -0
  20. package/src/stories/BlocksStories/Auth/NewPassword.stories.js +60 -0
  21. package/src/stories/BlocksStories/Auth/ResetPassword.stories.js +59 -0
  22. package/src/stories/BlocksStories/Auth/SignIn.stories.js +89 -0
  23. package/src/stories/BlocksStories/Auth/SignUp.stories.js +90 -0
  24. package/src/stories/BlocksStories/Payment/ChargeWallet.stories.js +30 -0
  25. package/src/stories/BlocksStories/Payment/PayWithCreditCard.stories.js +37 -0
  26. package/src/stories/BlocksStories/Payment/PayWithWallet.stories.js +17 -0
  27. package/src/stories/BlocksStories/Payment/PaymentSelection.stories.js +60 -0
  28. package/src/stories/LayoutStories/Box.stories.js +9 -20
  29. package/src/stories/UIStories/ActionButton.stories.js +1 -6
  30. package/src/stories/UIStories/AdaptiveButton.stories.js +1 -6
  31. package/src/stories/UIStories/Alert.stories.js +2 -3
  32. package/src/stories/UIStories/LogoButtons.stories.js +47 -64
  33. package/src/stories/UIStories/RadioSelector.stories.js +15 -44
  34. package/src/stories/UIStories/SettingsRow.stories.js +3 -16
  35. package/src/themes/HawaProvider.js +187 -178
  36. package/src/themes/QawaimTheme.js +199 -0
  37. package/src/ui/ActionButton.js +32 -35
  38. package/src/ui/AdaptiveButton.js +3 -8
  39. package/src/ui/HawaAlert.js +22 -24
  40. package/src/ui/HawaButton.js +43 -44
  41. package/src/ui/HawaInputLabel.js +22 -23
  42. package/src/ui/HawaLogoButton.js +7 -45
  43. package/src/ui/HawaRadio.js +18 -61
  44. package/src/ui/HawaSettingsRow.js +1 -27
  45. package/src/ui/HawaTextArea.js +1 -1
  46. package/src/ui/HawaTextField.js +146 -93
  47. package/src/ui/HawaTypography.js +19 -21
  48. package/src/ui/Row.js +1 -1
  49. package/src/ui/StyledTooltip.js +1 -1
  50. package/src/ui/TabPanel.js +1 -1
  51. package/storybook-static/8.1bf48ea7.iframe.bundle.js +1 -0
  52. package/storybook-static/iframe.html +1 -1
  53. package/storybook-static/index.html +1 -1
  54. package/storybook-static/main.a9a16923.iframe.bundle.js +1 -0
  55. package/storybook-static/{runtime~main.cfefe972.iframe.bundle.js → runtime~main.f1ebae9b.iframe.bundle.js} +1 -1
  56. package/storybook-static/vendors~main.f8d30727.iframe.bundle.js +76 -0
  57. package/storybook-static/{vendors~main.aa1d952a.iframe.bundle.js.LICENSE.txt → vendors~main.f8d30727.iframe.bundle.js.LICENSE.txt} +0 -0
  58. package/storybook-static/vendors~main.f8d30727.iframe.bundle.js.map +1 -0
  59. package/src/blocks/Account/UserProfile.js +0 -65
  60. package/src/blocks/Account/UserSettings.js +0 -15
  61. package/src/stories/BlocksStories/AuthForm.stories.js +0 -105
  62. package/src/stories/BlocksStories/PaymentForm.stories.js +0 -86
  63. package/src/stories/BlocksStories/UserForm.stories.js +0 -41
  64. package/src/stories/HawaProvider.stories.js +0 -22
  65. package/storybook-static/8.c4cb6081.iframe.bundle.js +0 -1
  66. package/storybook-static/main.5731dbe3.iframe.bundle.js +0 -1
  67. package/storybook-static/vendors~main.aa1d952a.iframe.bundle.js +0 -76
  68. package/storybook-static/vendors~main.aa1d952a.iframe.bundle.js.map +0 -1
@@ -2,6 +2,7 @@ import React from "react";
2
2
  import { HawaTextField, ActionButton } from "../../ui";
3
3
  import { Box } from "../../layout";
4
4
  import { FormProvider, useForm } from "react-hook-form";
5
+ import { Button, Container } from "@mui/material";
5
6
 
6
7
  export const CreditCardForm = (props) => {
7
8
  const methods = useForm();
@@ -11,50 +12,54 @@ export const CreditCardForm = (props) => {
11
12
  } = methods;
12
13
 
13
14
  return (
14
- <Box maxWidth={400} noColor noMargin noPadding>
15
- <Box noMargin>
16
- <FormProvider {...methods}>
17
- <form onSubmit={handleSubmit(props.handle)}>
18
- <HawaTextField
19
- name="password"
20
- placeholder="Enter password"
21
- type="password"
22
- inputLabel="Password"
23
- // startAdornment={
24
- // <InputAdornment position="start">
25
- // <PasswordIcon />
26
- // </InputAdornment>
27
- // }
28
- rules={{
29
- required: "Password is rquired"
30
- }}
31
- helperText={errors.password?.message}
32
- />
15
+ <Container maxWidth="xs">
16
+ <FormProvider {...methods}>
17
+ <form onSubmit={handleSubmit(props.handle)}>
18
+ <HawaTextField
19
+ fullWidth
20
+ name="password"
21
+ placeholder="Enter password"
22
+ type="number"
23
+ label="Card Number"
24
+ // startAdornment={
25
+ // <InputAdornment position="start">
26
+ // <PasswordIcon />
27
+ // </InputAdornment>
28
+ // }
29
+ rules={{
30
+ required: "Password is rquired"
31
+ }}
32
+ helperText={errors.password?.message}
33
+ />
33
34
 
34
- <HawaTextField
35
- name="password"
36
- placeholder="Enter password"
37
- type="password"
38
- inputLabel="Password"
39
- // startAdornment={
40
- // <InputAdornment position="start">
41
- // <PasswordIcon />
42
- // </InputAdornment>
43
- // }
44
- rules={{
45
- required: "Password is rquired"
46
- }}
47
- helperText={errors.password?.message}
48
- />
49
- <ActionButton
50
- last
51
- fullWidth
52
- text={"Sign In"}
53
- onClick={props.handleSignIn}
54
- />
55
- </form>
56
- </FormProvider>
57
- </Box>
58
- </Box>
35
+ <HawaTextField
36
+ fullWidth
37
+ name="password"
38
+ placeholder="Enter password"
39
+ type="password"
40
+ label="Name On Card"
41
+ // startAdornment={
42
+ // <InputAdornment position="start">
43
+ // <PasswordIcon />
44
+ // </InputAdornment>
45
+ // }
46
+ rules={{
47
+ required: "Password is rquired"
48
+ }}
49
+ helperText={errors.password?.message}
50
+ />
51
+
52
+ <Button
53
+ type="submit"
54
+ fullWidth
55
+ variant="last"
56
+ onClick={props.handlePayWithCreditCard}
57
+ >
58
+ {/* {props.texts.signInText} */}
59
+ {"Pay with Credit Card"}
60
+ </Button>
61
+ </form>
62
+ </FormProvider>
63
+ </Container>
59
64
  );
60
65
  };
@@ -1,14 +1,24 @@
1
1
  import React from "react";
2
2
  import { ActionButton } from "../../ui";
3
3
  import { Box } from "../../layout";
4
+ import { Button, Container, Typography } from "@mui/material";
4
5
 
5
6
  export const PayWithWallet = (props) => {
6
7
  return (
7
- <Box maxWidth={400} noColor noMargin noPadding>
8
- <Box noMargin>
9
- <div>Wallet Balance</div>
10
- <ActionButton text="Pay now" />
11
- </Box>
12
- </Box>
8
+ <Container maxWidth="xs">
9
+ <Typography align="center">Wallet Balance</Typography>
10
+ <Typography align="center" variant="h1">
11
+ {props.walletBalance || "0"}
12
+ <Typography>{props.currency || "SAR"}</Typography>
13
+ </Typography>
14
+ <Button
15
+ type="submit"
16
+ fullWidth
17
+ variant="last"
18
+ onClick={props.handlePayWithWallet}
19
+ >
20
+ {"Pay Now"}
21
+ </Button>
22
+ </Container>
13
23
  );
14
24
  };
@@ -78,7 +78,6 @@ const PaymentMethodButton = (props) => {
78
78
  padding: 20,
79
79
  width: "90%",
80
80
  margin: 10,
81
- borderRadius: "var(--borderR)"
82
81
  }}
83
82
  onClick={(e) => props.handlePaymentMethod(e, props.methodCode)}
84
83
  >
@@ -1,64 +1,62 @@
1
1
  import React from "react";
2
2
  import PropTypes from "prop-types";
3
- import { Box } from "../../layout";
4
3
  import { HawaTextField, HawaTypography, HawaLogoButton } from "../../ui";
4
+ import { Container } from "@mui/material";
5
5
 
6
6
  export const SelectPayment = (props) => {
7
7
  return (
8
- <Box maxWidth={400} noColor noMargin noPadding>
9
- <Box noMargin>
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
- </Box>
61
- </Box>
8
+ <Container maxWidth="xs">
9
+ <HawaTypography align="center">Choose Payment Method</HawaTypography>
10
+ {props.viaWallet && (
11
+ <HawaLogoButton
12
+ logo="wallet"
13
+ buttonText={props.walletLabel}
14
+ onClick={props.handleWallet}
15
+ />
16
+ )}
17
+ {props.viaCreditCard && (
18
+ <HawaLogoButton
19
+ logo="visa/master"
20
+ buttonText={props.visaMasterLabel}
21
+ onClick={props.handleCreditCard}
22
+ />
23
+ )}
24
+ {props.viaMada && (
25
+ <HawaLogoButton
26
+ logo="mada"
27
+ buttonText={props.madaLabel}
28
+ onClick={props.handleMada}
29
+ />
30
+ )}
31
+ {props.viaSTCPay && (
32
+ <HawaLogoButton
33
+ logo="stcpay"
34
+ buttonText={props.stcPayLabel}
35
+ onClick={props.handleSTCPay}
36
+ />
37
+ )}
38
+ {props.viaPayPal && (
39
+ <HawaLogoButton
40
+ logo="paypal"
41
+ buttonText={props.paypalLabel}
42
+ onClick={props.handlePayPal}
43
+ />
44
+ )}
45
+ {props.viaGooglePay && (
46
+ <HawaLogoButton
47
+ logo="googlepay"
48
+ buttonText={props.googlePayLabel}
49
+ onClick={props.handleGooglePay}
50
+ />
51
+ )}
52
+ {props.viaApplePay && (
53
+ <HawaLogoButton
54
+ logo="applepay"
55
+ buttonText={props.applePayLabel}
56
+ onClick={props.handleApplePay}
57
+ />
58
+ )}
59
+ </Container>
62
60
  );
63
61
  };
64
62
 
package/src/index.js CHANGED
@@ -1,4 +1,3 @@
1
1
  export * from "./blocks/Account";
2
2
  export * from "./blocks/AuthForms";
3
3
  export * from "./blocks/Payment";
4
- //export * from "./components/Hawa";
package/src/layout/Box.js CHANGED
@@ -1,38 +1,41 @@
1
- import React, { useContext } from "react";
2
- import { ThemeProvider } from "../themes/HawaProvider";
1
+ import React from "react";
3
2
 
4
3
  export const Box = (props) => {
5
- const { hawaTheme, themeName } = useContext(ThemeProvider);
6
- let boxStyle = {};
4
+ // let boxStyle = {};
7
5
 
8
- let currentTheme = Object.keys(hawaTheme.layout).find(
9
- (tName) => tName.toLowerCase() === themeName?.toLowerCase()
10
- );
11
- if (currentTheme) {
12
- boxStyle = {
13
- display: "flex",
14
- flexDirection: props.horizontal ? "row" : "column",
15
- ...hawaTheme?.layout[currentTheme],
16
- backgroundColor: props.noColor
17
- ? "none"
18
- : hawaTheme.layout[currentTheme].backgroundColor,
19
- padding: props.noPadding ? 0 : hawaTheme?.layout[currentTheme].padding,
20
- margin: props.noMargin ? 0 : hawaTheme?.layout[currentTheme].margin,
21
- maxWidth: props.maxWidth
22
- };
23
- } else {
24
- boxStyle = {
25
- display: "flex",
26
- flexDirection: props.horizontal ? "row" : "column",
27
- color: "white",
28
- marginTop: props.last ? 10 * 2 : 0,
29
- backgroundColor: props.noColor ? "none" : "lightGrey",
30
- padding: props.noPadding ? 0 : 10,
31
- margin: props.noMargin ? 0 : 10,
32
- maxWidth: props.maxWidth,
33
- borderRadius: 0
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 <div style={boxStyle}>{props.children}</div>;
34
+ return (
35
+ <div
36
+ // style={boxStyle}
37
+ >
38
+ {props.children}
39
+ </div>
40
+ );
38
41
  };
@@ -0,0 +1,21 @@
1
+ import React from "react";
2
+ import { UserProfileForm } from "../../../blocks/Account";
3
+
4
+ export default {
5
+ title: "Blocks/Account/User Profile",
6
+ component: [UserProfile],
7
+ argTypes: {}
8
+ };
9
+
10
+ const ProfileTemplate = (args) => {
11
+ return <UserProfileForm {...args} />;
12
+ };
13
+ export const UserProfile = ProfileTemplate.bind({});
14
+ UserProfile.args = {
15
+ viaGoogle: true,
16
+ viaGithub: true,
17
+ viaTwitter: true,
18
+ showError: false,
19
+ errorTitle: "Error",
20
+ errorText: "Something went wrong"
21
+ };
@@ -0,0 +1,21 @@
1
+ import React from "react";
2
+ import { UserSettingsForm } from "../../../blocks/Account";
3
+
4
+ export default {
5
+ title: "Blocks/Account/User Settings",
6
+ component: UserSettingsForm,
7
+ argTypes: {
8
+ theme: {
9
+ options: ["primary", "secondary", "default"],
10
+ control: { type: "select" }
11
+ }
12
+ }
13
+ };
14
+
15
+ export const UserSettings = (args) => {
16
+ return <UserSettingsForm {...args} />;
17
+ };
18
+ UserSettings.args = {
19
+ theme: "primary",
20
+ title: "red"
21
+ };
@@ -0,0 +1,60 @@
1
+ import React from "react";
2
+ import { NewPasswordForm } from "../../../blocks/AuthForms";
3
+
4
+ export default {
5
+ title: "Blocks/Auth/New Password",
6
+ component: [NewPasswordForm],
7
+ argTypes: {
8
+
9
+ showError: {
10
+ default: false,
11
+ control: "boolean",
12
+ description: "Display the error when auth fails",
13
+ table: { defaultValue: { summary: true } }
14
+ },
15
+ errorTitle: {
16
+ default: " ",
17
+ control: "text",
18
+ description: "The error text for the auth failure",
19
+ table: { defaultValue: { summary: "" } }
20
+ },
21
+ errorText: {
22
+ default: "Something went wrong",
23
+ control: "text",
24
+ description: "The error text for the auth failure",
25
+ table: { defaultValue: { summary: "Something went wrong" } }
26
+ }
27
+ }
28
+ };
29
+
30
+ const NewPasswordTemplate = (args) => {
31
+ return (
32
+ <NewPasswordForm
33
+ {...args}
34
+ texts={{
35
+ emailLabel: "Email",
36
+ emailPlaceholder: "Enter your email",
37
+ emailRequiredText: "Email is required",
38
+ passwordPlaceholder: "Enter password",
39
+ updatePassword: "Update Password",
40
+ passwordRequiredText: "Password is required",
41
+ passwordLabel: "Choose new password",
42
+ confirmPasswordPlaceholder: "Confirm password",
43
+ confirmPasswordLabel: "Confirm",
44
+ forgotPasswordText: "Forgot password?",
45
+ newUserText: "New user?",
46
+ signUpText: "Sign up",
47
+ signInText: "Sign in",
48
+ googleButtonLabel: "Sign in with Google",
49
+ githubButtonLabel: "Sign in with Github",
50
+ twitterButtonLabel: "Sign in with Twitter"
51
+ }}
52
+ error={args.showError}
53
+ />
54
+ );
55
+ };
56
+ export const NewPassword = NewPasswordTemplate.bind({});
57
+ NewPassword.args = {
58
+ showError: false,
59
+ passwordChanged: false
60
+ };
@@ -0,0 +1,59 @@
1
+ import React from "react";
2
+ import { ResetPasswordForm } from "../../../blocks/AuthForms";
3
+
4
+ export default {
5
+ title: "Blocks/Auth/Reset Password",
6
+ component: [ResetPasswordForm],
7
+ argTypes: {
8
+
9
+ showError: {
10
+ default: false,
11
+ control: "boolean",
12
+ description: "Display the error when auth fails",
13
+ table: { defaultValue: { summary: true } }
14
+ },
15
+ errorTitle: {
16
+ default: " ",
17
+ control: "text",
18
+ description: "The error text for the auth failure",
19
+ table: { defaultValue: { summary: "" } }
20
+ },
21
+ errorText: {
22
+ default: "Something went wrong",
23
+ control: "text",
24
+ description: "The error text for the auth failure",
25
+ table: { defaultValue: { summary: "Something went wrong" } }
26
+ }
27
+ }
28
+ };
29
+
30
+ const ResetPasswordTemplate = (args) => {
31
+ return (
32
+ <ResetPasswordForm
33
+ error={args.showError}
34
+ texts={{
35
+ emailLabel: "Email",
36
+ emailPlaceholder: "Enter your email",
37
+ emailRequiredText: "Email is required",
38
+ emailInvalidText: "Invalid email address",
39
+ passwordLabel: "Password",
40
+ resetPassword: "Reset Password",
41
+ passwordRequiredText: "Password is required",
42
+ forgotPasswordText: "Forgot password?",
43
+ newUserText: "New user?",
44
+ signUpText: "Sign up",
45
+ signInText: "Sign in",
46
+ googleButtonLabel: "Sign in with Google",
47
+ githubButtonLabel: "Sign in with Github",
48
+ twitterButtonLabel: "Sign in with Twitter"
49
+ }}
50
+ {...args}
51
+ handleResetPassword={() => console.log("resetting password")}
52
+ />
53
+ );
54
+ };
55
+ export const ResetPassword = ResetPasswordTemplate.bind({});
56
+ ResetPassword.args = {
57
+ showError: false,
58
+ sent: false
59
+ };
@@ -0,0 +1,89 @@
1
+ import React from "react";
2
+ import { SignInForm } from "../../../blocks/AuthForms";
3
+
4
+ export default {
5
+ title: "Blocks/Auth/Sign In",
6
+ component: [SignInForm],
7
+ argTypes: {
8
+ viaGoogle: {
9
+ default: true,
10
+ control: "boolean",
11
+ description: "Display the sign in via Google button",
12
+ table: { defaultValue: { summary: true } }
13
+ },
14
+ viaTwitter: {
15
+ default: true,
16
+ control: "boolean",
17
+ description: "Display the sign in via Twitter button",
18
+ table: { defaultValue: { summary: true } }
19
+ },
20
+ viaGithub: {
21
+ default: true,
22
+ control: "boolean",
23
+ description: "Display the sign in via Github button",
24
+ table: { defaultValue: { summary: true } }
25
+ },
26
+ showError: {
27
+ default: false,
28
+ control: "boolean",
29
+ description: "Display the error when auth fails",
30
+ table: { defaultValue: { summary: true } }
31
+ },
32
+ errorTitle: {
33
+ default: " ",
34
+ control: "text",
35
+ description: "The error text for the auth failure",
36
+ table: { defaultValue: { summary: "" } }
37
+ },
38
+ errorText: {
39
+ default: "Something went wrong",
40
+ control: "text",
41
+ description: "The error text for the auth failure",
42
+ table: { defaultValue: { summary: "Something went wrong" } }
43
+ }
44
+ }
45
+ };
46
+
47
+ const SignInTemplate = (args) => {
48
+ return (
49
+ <SignInForm
50
+ {...args}
51
+ error={args.showError}
52
+ texts={{
53
+ emailLabel: "Email",
54
+ emailPlaceholder: "Enter your email",
55
+ emailRequiredText: "Email is required",
56
+ emailInvalidText: "Invalid email address",
57
+ passwordLabel: "Password",
58
+ passwordPlaceholder: "Enter password",
59
+ passwordRequiredText: "Password is required",
60
+ forgotPasswordText: "Forgot password?",
61
+ newUserText: "New user?",
62
+ signUpText: "Sign up",
63
+ signInText: "Sign in",
64
+ googleButtonLabel: "Sign in with Google",
65
+ githubButtonLabel: "Sign in with Github",
66
+ twitterButtonLabel: "Sign in with Twitter"
67
+ }}
68
+ handleSignIn={(e) => console.log("singing in via email", e)}
69
+ handleForgotPassword={() => console.log("user forgot password")}
70
+ handleGoogleSignIn={() => console.log("signing in via google")}
71
+ handleGithubSignIn={() => console.log("signing in via github")}
72
+ handleTwitterSignIn={() => console.log("signing in via Twitter")}
73
+ handleRouteToSignUp={() => console.log("switching to sign up")}
74
+ viaGoogle={args.viaGoogle}
75
+ viaGithub={args.viaGithub}
76
+ viaTwitter={args.viaTwitter}
77
+ />
78
+ );
79
+ };
80
+
81
+ export const SignIn = SignInTemplate.bind({});
82
+ SignIn.args = {
83
+ viaGoogle: true,
84
+ viaGithub: true,
85
+ viaTwitter: true,
86
+ showError: false,
87
+ errorTitle: "Error",
88
+ errorText: "Something went wrong"
89
+ };