@sikka/hawa 0.0.10 → 0.0.13

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 (95) 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 +79 -0
  5. package/src/blocks/Account/UserSettingsForm.js +13 -0
  6. package/src/blocks/Account/index.js +2 -2
  7. package/src/blocks/AuthForms/NewPasswordForm.js +58 -86
  8. package/src/blocks/AuthForms/ResetPasswordForm.js +44 -43
  9. package/src/blocks/AuthForms/SignInForm.js +99 -103
  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 +50 -45
  13. package/src/blocks/Payment/PayWithWallet.js +17 -7
  14. package/src/blocks/Payment/PaymentMethod.js +0 -1
  15. package/src/blocks/Payment/SelectPayment.js +54 -56
  16. package/src/blocks/Pricing/SignInForm.js +126 -0
  17. package/src/elements/ActionButton.js +38 -0
  18. package/src/elements/AdaptiveButton.js +32 -0
  19. package/src/{ui → elements}/AutoCompleteField.js +0 -0
  20. package/src/{ui → elements}/DragDropImages.js +0 -0
  21. package/src/{ui → elements}/Hawa.js +0 -0
  22. package/src/elements/HawaAlert.js +35 -0
  23. package/src/elements/HawaButton.js +47 -0
  24. package/src/elements/HawaCard.js +77 -0
  25. package/src/{ui → elements}/HawaCheckbox.js +0 -0
  26. package/src/elements/HawaInputLabel.js +31 -0
  27. package/src/{ui → elements}/HawaLogoButton.js +7 -45
  28. package/src/elements/HawaRadio.js +32 -0
  29. package/src/elements/HawaSettingsRow.js +27 -0
  30. package/src/elements/HawaSwitch.js +6 -0
  31. package/src/{ui → elements}/HawaTextArea.js +1 -1
  32. package/src/elements/HawaTextField.js +160 -0
  33. package/src/elements/HawaTypography.js +26 -0
  34. package/src/{ui → elements}/RadioBox.js +0 -0
  35. package/src/{ui → elements}/Row.js +1 -1
  36. package/src/{ui → elements}/SelectedField.js +0 -0
  37. package/src/{ui → elements}/StyledTooltip.js +1 -1
  38. package/src/{ui → elements}/TabPanel.js +1 -1
  39. package/src/{ui → elements}/index.js +1 -1
  40. package/src/index.js +0 -2
  41. package/src/layout/Box.js +36 -33
  42. package/src/stories/BlocksStories/Account/UserProfile.stories.js +21 -0
  43. package/src/stories/BlocksStories/Account/UserSettings.stories.js +55 -0
  44. package/src/stories/BlocksStories/Auth/NewPassword.stories.js +60 -0
  45. package/src/stories/BlocksStories/Auth/ResetPassword.stories.js +59 -0
  46. package/src/stories/BlocksStories/Auth/SignIn.stories.js +89 -0
  47. package/src/stories/BlocksStories/Auth/SignUp.stories.js +90 -0
  48. package/src/stories/BlocksStories/Payment/ChargeWallet.stories.js +30 -0
  49. package/src/stories/BlocksStories/Payment/PayWithCreditCard.stories.js +37 -0
  50. package/src/stories/BlocksStories/Payment/PayWithWallet.stories.js +17 -0
  51. package/src/stories/BlocksStories/Payment/PaymentSelection.stories.js +60 -0
  52. package/src/stories/ElementsStories/AdaptiveButton.stories.js +51 -0
  53. package/src/stories/{UIStories → ElementsStories}/Alert.stories.js +3 -4
  54. package/src/stories/{UIStories → ElementsStories}/InputLabel.stories.js +1 -1
  55. package/src/stories/ElementsStories/ItemCard.stories.js +18 -0
  56. package/src/stories/ElementsStories/LogoButtons.stories.js +73 -0
  57. package/src/stories/ElementsStories/PricingCard.stories.js +27 -0
  58. package/src/stories/ElementsStories/RadioSelector.stories.js +36 -0
  59. package/src/stories/ElementsStories/SettingsRow.stories.js +63 -0
  60. package/src/stories/{UIStories → ElementsStories}/TextField.stories.js +1 -1
  61. package/src/stories/LayoutStories/Box.stories.js +11 -31
  62. package/storybook-static/8.1bf48ea7.iframe.bundle.js +1 -0
  63. package/storybook-static/iframe.html +1 -1
  64. package/storybook-static/index.html +1 -1
  65. package/storybook-static/main.00b064cb.iframe.bundle.js +1 -0
  66. package/storybook-static/{runtime~main.cfefe972.iframe.bundle.js → runtime~main.f1ebae9b.iframe.bundle.js} +1 -1
  67. package/storybook-static/vendors~main.5eab66d3.iframe.bundle.js +76 -0
  68. package/storybook-static/{vendors~main.aa1d952a.iframe.bundle.js.LICENSE.txt → vendors~main.5eab66d3.iframe.bundle.js.LICENSE.txt} +0 -0
  69. package/storybook-static/vendors~main.5eab66d3.iframe.bundle.js.map +1 -0
  70. package/src/blocks/Account/UserProfile.js +0 -65
  71. package/src/blocks/Account/UserSettings.js +0 -15
  72. package/src/stories/BlocksStories/AuthForm.stories.js +0 -105
  73. package/src/stories/BlocksStories/PaymentForm.stories.js +0 -86
  74. package/src/stories/BlocksStories/UserForm.stories.js +0 -41
  75. package/src/stories/HawaProvider.stories.js +0 -22
  76. package/src/stories/UIStories/ActionButton.stories.js +0 -46
  77. package/src/stories/UIStories/AdaptiveButton.stories.js +0 -81
  78. package/src/stories/UIStories/CheckBox.stories.js +0 -34
  79. package/src/stories/UIStories/LogoButtons.stories.js +0 -90
  80. package/src/stories/UIStories/RadioSelector.stories.js +0 -53
  81. package/src/stories/UIStories/SettingsRow.stories.js +0 -64
  82. package/src/themes/HawaProvider.js +0 -183
  83. package/src/ui/ActionButton.js +0 -41
  84. package/src/ui/AdaptiveButton.js +0 -136
  85. package/src/ui/HawaAlert.js +0 -37
  86. package/src/ui/HawaButton.js +0 -48
  87. package/src/ui/HawaInputLabel.js +0 -32
  88. package/src/ui/HawaRadio.js +0 -73
  89. package/src/ui/HawaSettingsRow.js +0 -71
  90. package/src/ui/HawaTextField.js +0 -107
  91. package/src/ui/HawaTypography.js +0 -28
  92. package/storybook-static/8.c4cb6081.iframe.bundle.js +0 -1
  93. package/storybook-static/main.5731dbe3.iframe.bundle.js +0 -1
  94. package/storybook-static/vendors~main.aa1d952a.iframe.bundle.js +0 -76
  95. package/storybook-static/vendors~main.aa1d952a.iframe.bundle.js.map +0 -1
@@ -1,7 +1,8 @@
1
1
  import React from "react";
2
- import { HawaTextField, ActionButton } from "../../ui";
2
+ import { HawaTextField, ActionButton } from "../../elements";
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
- import { ActionButton } from "../../ui";
2
+ import { ActionButton } from "../../elements";
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
- import { HawaTextField, HawaTypography, HawaLogoButton } from "../../ui";
3
+ import { HawaTextField, HawaTypography, HawaLogoButton } from "../../elements";
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
 
@@ -0,0 +1,126 @@
1
+ import React from "react";
2
+ import { HawaTextField, HawaLogoButton } from "../../elements";
3
+ import { FormProvider, useForm } from "react-hook-form";
4
+ import InputAdornment from "@mui/material/InputAdornment";
5
+ import EmailIcon from "@mui/icons-material/MailOutline";
6
+ import PasswordIcon from "@mui/icons-material/HttpsOutlined";
7
+ import Container from "@mui/material/Container";
8
+ import Typography from "@mui/material/Typography";
9
+ import Button from "@mui/material/Button";
10
+ import Alert from "@mui/material/Alert";
11
+ import AlertTitle from "@mui/material/AlertTitle";
12
+
13
+ export const SignInForm = (props) => {
14
+ const methods = useForm();
15
+ const {
16
+ formState: { errors },
17
+ handleSubmit
18
+ } = methods;
19
+
20
+ return (
21
+ <Container maxWidth="xs" variant="auth">
22
+ {props.error && (
23
+ <Alert severity="error">
24
+ {props.errorTitle && <AlertTitle>{props.errorTitle}</AlertTitle>}
25
+ {props.errorText}
26
+ </Alert>
27
+ )}
28
+ <FormProvider {...methods}>
29
+ <form onSubmit={handleSubmit(props.handleSignIn)}>
30
+ <HawaTextField
31
+ fullWidth
32
+ type="text"
33
+ name="email"
34
+ label={props.texts.emailLabel}
35
+ placeholder={props.texts.emailPlaceholder}
36
+ startAdornment={
37
+ <InputAdornment position="start">
38
+ <EmailIcon />
39
+ </InputAdornment>
40
+ }
41
+ rules={{
42
+ required: props.texts.emailRequired,
43
+ pattern: {
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: props.texts.emailInvalidText
47
+ }
48
+ }}
49
+ helperText={errors.email?.message}
50
+ />
51
+
52
+ <HawaTextField
53
+ fullWidth
54
+ name="password"
55
+ placeholder={props.texts.passwordPlaceholder}
56
+ type="password"
57
+ label={props.texts.passwordLabel}
58
+ startAdornment={
59
+ <InputAdornment position="start">
60
+ <PasswordIcon />
61
+ </InputAdornment>
62
+ }
63
+ rules={{
64
+ required: props.texts.passwordRequired
65
+ }}
66
+ helperText={errors.password?.message}
67
+ />
68
+ <Typography
69
+ style={{
70
+ cursor: "pointer",
71
+ marginTop: 5,
72
+ width: "max-content",
73
+ fontSize: 15,
74
+ padding: 5
75
+ }}
76
+ onClick={props.handleForgotPassword}
77
+ >
78
+ {props.texts.forgotPasswordText}
79
+ </Typography>
80
+ <Button type="submit" fullWidth variant="last">
81
+ {props.texts.signInText}
82
+ </Button>
83
+ </form>
84
+ </FormProvider>
85
+ <Typography
86
+ variant="subtitle2"
87
+ style={{ marginTop: 5, textAlign: "center", padding: 5 }}
88
+ >
89
+ {props.texts.newUserText}{" "}
90
+ <span
91
+ onClick={props.handleRouteToSignUp}
92
+ style={{
93
+ cursor: "pointer",
94
+ color: "blue",
95
+ textAlign: "center"
96
+ }}
97
+ >
98
+ {props.texts.signUpText}
99
+ </span>
100
+ </Typography>
101
+ <div style={{ display: "flex", flexDirection: "column" }}>
102
+ {props.viaGoogle && (
103
+ <HawaLogoButton
104
+ logo="google"
105
+ buttonText={props.texts.googleButtonLabel}
106
+ onClick={props.handleGoogleSignIn}
107
+ />
108
+ )}
109
+ {props.viaGithub && (
110
+ <HawaLogoButton
111
+ logo="github"
112
+ buttonText={props.texts.githubButtonLabel}
113
+ onClick={props.handleGithubSignIn}
114
+ />
115
+ )}
116
+ {props.viaTwitter && (
117
+ <HawaLogoButton
118
+ logo="twitter"
119
+ buttonText={props.texts.twitterButtonLabel}
120
+ onClick={props.handleTwitterSignIn}
121
+ />
122
+ )}
123
+ </div>
124
+ </Container>
125
+ );
126
+ };
@@ -0,0 +1,38 @@
1
+ import Button from "@mui/material/Button";
2
+ // import { styled, darken } from "@mui/material/styles";
3
+
4
+ export const ActionButton = (props) => {
5
+ // const currentTheme = Object.keys(hawaTheme.actionButton).find(
6
+ // (tName) => tName.toLowerCase() === themeName?.toLowerCase()
7
+ // );
8
+ // let actionButtonStyle = {};
9
+
10
+ // if (currentTheme) {
11
+ // actionButtonStyle = {
12
+ // ...hawaTheme.actionButton[currentTheme],
13
+ // margin: props.last ? 0 : hawaTheme.actionButton[currentTheme].margin,
14
+ // marginTop: props.last
15
+ // ? hawaTheme.actionButton[currentTheme].margin * 2
16
+ // : 0,
17
+ // "&:hover": {
18
+ // backgroundColor: darken(
19
+ // hawaTheme.actionButton[currentTheme]?.backgroundColor,
20
+ // 0.1
21
+ // )
22
+ // }
23
+ // };
24
+ // } else {
25
+ // actionButtonStyle = {
26
+ // backgroundColor: "black",
27
+ // color: "white",
28
+ // padding: 10,
29
+ // marginTop: props.last ? 10 * 2 : 0,
30
+ // borderRadius: 0
31
+ // };
32
+ // }
33
+
34
+ // const StyledButton = styled(Button)(({ theme }) => {
35
+ // return { ...actionButtonStyle };
36
+ // });
37
+ return <Button {...props}>{props.text}</Button>;
38
+ };
@@ -0,0 +1,32 @@
1
+ import React, { useState } from "react";
2
+ import Button from "@mui/material/Button";
3
+ import Tooltip from "@mui/material/Tooltip";
4
+ import PropTypes from "prop-types";
5
+ import { StyledTooltip } from "./StyledTooltip";
6
+ import { getTextColor } from "../util";
7
+
8
+ export const AdaptiveButton = (props) => {
9
+ if (props.showText) {
10
+ return (
11
+ <Button variant="adaptive-dark" onClick={props.onClick}>
12
+ {props.icon}
13
+ <div style={{ width: 10 }} />
14
+ {props.buttonText}
15
+ </Button>
16
+ );
17
+ } else {
18
+ //icon only
19
+ return (
20
+ <Tooltip title={props.buttonText} placement="top">
21
+ <Button variant="adaptive-dark" onClick={props.onClick}>
22
+ {props.icon}
23
+ </Button>
24
+ </Tooltip>
25
+ );
26
+ }
27
+ };
28
+
29
+ AdaptiveButton.propTypes = {
30
+ buttonText: PropTypes.string,
31
+ showText: PropTypes.bool
32
+ };
File without changes
File without changes
File without changes
@@ -0,0 +1,35 @@
1
+ import React from "react";
2
+ // import { styled } from "@mui/material/styles";
3
+
4
+ import Alert from "@mui/material/Alert";
5
+ import AlertTitle from "@mui/material/AlertTitle";
6
+
7
+ export const HawaAlert = (props) => {
8
+ // const currentTheme = Object.keys(hawaTheme.alerts).find(
9
+ // (tName) => tName.toLowerCase() === themeName?.toLowerCase()
10
+ // );
11
+ // let alertStyle = {};
12
+
13
+ // if (currentTheme) {
14
+ // alertStyle = {
15
+ // ...hawaTheme.alerts[currentTheme]
16
+ // };
17
+ // } else {
18
+ // alertStyle = {
19
+ // marginBottom: 10
20
+ // };
21
+ // }
22
+
23
+ // const StyledAlert = styled(Alert)(({ theme }) => {
24
+ // return {
25
+ // ...alertStyle
26
+ // };
27
+ // });
28
+
29
+ return (
30
+ <Alert>
31
+ {props.title && <AlertTitle>{props.title}</AlertTitle>}
32
+ {props.text}
33
+ </Alert>
34
+ );
35
+ };
@@ -0,0 +1,47 @@
1
+ import React from "react";
2
+ // import { ThemeProvider } from "../themes/HawaProvider";
3
+ // import { styled, darken } from "@mui/material/styles";
4
+ import Button from "@mui/material/Button";
5
+
6
+ export const HawaButton = (props) => {
7
+ // let buttonStyle = {};
8
+ // let currentTheme = Object.keys(hawaTheme.actionButton).find(
9
+ // (tName) => tName.toLowerCase() === themeName?.toLowerCase()
10
+ // );
11
+ // if (currentTheme) {
12
+ // buttonStyle = {
13
+ // ...hawaTheme.actionButton[currentTheme],
14
+ // // marginTop: theme.actionButton[currentTheme].margin,
15
+ // border: props.outlined ? "2px solid black" : "none",
16
+ // // borderRadius: theme.actionButton[currentTheme].borderRadius,
17
+ // backgroundColor: "white",
18
+ // // height: 50,
19
+ // "&:hover": {
20
+ // backgroundColor: darken("#ffffff", 0.1)
21
+ // }
22
+ // };
23
+ // } else {
24
+ // // Default theme
25
+ // buttonStyle = {
26
+ // cursor: "pointer",
27
+ // display: "flex",
28
+ // flexDirection: "row",
29
+ // alignItems: "center",
30
+ // justifyContent: "center",
31
+ // marginTop: hawaTheme.actionButton[currentTheme]?.margin,
32
+ // border: props.outlined ? "2px solid black" : "none",
33
+ // borderRadius: 0,
34
+ // //backgroundColor: "white",
35
+ // backgroundColor: "red",
36
+ // "&:hover": {
37
+ // backgroundColor: darken("#ffffff", 0.1)
38
+ // }
39
+ // };
40
+ // }
41
+ // const StyledButton = styled(Button)(({ theme }) => {
42
+ // return {
43
+ // ...buttonStyle
44
+ // };
45
+ // });
46
+ return <Button {...props}>{props.children}</Button>;
47
+ };
@@ -0,0 +1,77 @@
1
+ import React from "react";
2
+ import Container from "@mui/material/Container";
3
+ import { Button, Typography } from "@mui/material";
4
+ import CheckIcon from "@mui/icons-material/CheckCircleOutlined";
5
+ export const HawaCard = (props) => {
6
+ return (
7
+ <Container maxWidth="xs" variant="price-card">
8
+ <Container variant="price-header">
9
+ <Typography variant="h3" fontWeight={500}>
10
+ {props.title}
11
+ </Typography>
12
+ <Typography variant="caption">{props.subtitle}</Typography>
13
+ <br />
14
+ <Typography variant="h5" fontWeight={500}>
15
+ {props.price} {props.currency} /{" "}
16
+ <span style={{ fontSize: 14 }}>{props.cycleText}</span>
17
+ </Typography>
18
+ {/* <div style={{ width: 5 }} /> */}
19
+ {/* <Typography variant="caption">{props.currency}</Typography> */}
20
+ </Container>
21
+ {/* <div style={{ marginBottom: 20, width: "100%" }}>
22
+ <div
23
+ style={{
24
+ display: "flex",
25
+ flexDirection: "row",
26
+ alignItems: "center",
27
+ // justifyContent: "center",
28
+ // backgroundColor: "red",
29
+
30
+ width: "100%"
31
+ }}
32
+ >
33
+ <Typography variant="h2" fontWeight={500}>
34
+ {props.price}
35
+ </Typography>
36
+ <div style={{ width: 5 }} />
37
+ <Typography variant="caption">{props.currency}</Typography>
38
+ </div>
39
+ <Typography>{props.cycleText}</Typography>
40
+ </div> */}
41
+ <div style={{ padding: 20 }}>
42
+ {props.features?.map((feature) => {
43
+ return (
44
+ <div
45
+ style={{
46
+ display: "flex",
47
+ flexDirection: "row",
48
+ alignItems: "center",
49
+ justifyContent: "flex-start",
50
+ marginTop: 10,
51
+ width: "100%"
52
+ }}
53
+ >
54
+ <div
55
+ style={{
56
+ display: "flex",
57
+ flexDirection: "row",
58
+ // alignItems: "flex-end",
59
+ justifyContent: "flex-end",
60
+ // backgroundColor: "red",
61
+ width: "10%"
62
+ }}
63
+ >
64
+ <CheckIcon fontSize="small" />
65
+ </div>
66
+ <div style={{ width: 10 }} />
67
+ <Typography variant="subtitle2">{feature}</Typography>
68
+ </div>
69
+ );
70
+ })}
71
+ </div>
72
+ <Button variant="contained" style={{ margin: 20 }}>
73
+ Select Plan
74
+ </Button>
75
+ </Container>
76
+ );
77
+ };
File without changes
@@ -0,0 +1,31 @@
1
+ import InputLabel from "@mui/material/InputLabel";
2
+
3
+ export const HawaInputLabel = (props) => {
4
+ // let labelStyle = {};
5
+
6
+ // let currentTheme = Object.keys(hawaTheme.actionButton).find(
7
+ // (tName) => tName.toLowerCase() === themeName?.toLowerCase()
8
+ // );
9
+ // if (currentTheme) {
10
+ // labelStyle = {
11
+ // margin: 15,
12
+ // marginRight: 5,
13
+ // marginLeft: 5,
14
+ // color: hawaTheme?.layout[currentTheme].color
15
+ // };
16
+ // } else {
17
+ // labelStyle = {
18
+ // margin: 15,
19
+ // marginRight: 0,
20
+ // marginLeft: 0,
21
+ // color: "black"
22
+ // };
23
+ // }
24
+ return (
25
+ <InputLabel
26
+ // style={labelStyle}
27
+ >
28
+ <div style={{ fontSize: 15 }}>{props.label}</div>
29
+ </InputLabel>
30
+ );
31
+ };