@sikka/hawa 0.0.103 → 0.0.104
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/dist/styles.css +108 -51
- package/es/blocks/AuthForms/AppLanding.d.ts +1 -0
- package/es/blocks/AuthForms/CodeConfirmation.d.ts +6 -1
- package/es/blocks/AuthForms/NewPasswordForm.d.ts +0 -5
- package/es/blocks/AuthForms/ResetPasswordForm.d.ts +0 -3
- package/es/blocks/Referral/ReferralAccount.d.ts +7 -0
- package/es/blocks/Referral/ReferralSettlement.d.ts +8 -0
- package/es/blocks/Referral/ReferralStats.d.ts +8 -0
- package/es/blocks/Referral/index.d.ts +3 -0
- package/es/blocks/index.d.ts +1 -0
- package/es/elements/HawaChip.d.ts +1 -0
- package/es/elements/HawaCopyrights.d.ts +5 -5
- package/es/elements/HawaItemCard.d.ts +14 -6
- package/es/elements/HawaMenu.d.ts +2 -3
- package/es/elements/HawaModal.d.ts +1 -0
- package/es/elements/HawaSelect.d.ts +2 -1
- package/es/elements/HawaTable.d.ts +2 -2
- package/es/index.es.js +1 -1
- package/lib/blocks/AuthForms/AppLanding.d.ts +1 -0
- package/lib/blocks/AuthForms/CodeConfirmation.d.ts +6 -1
- package/lib/blocks/AuthForms/NewPasswordForm.d.ts +0 -5
- package/lib/blocks/AuthForms/ResetPasswordForm.d.ts +0 -3
- package/lib/blocks/Referral/ReferralAccount.d.ts +7 -0
- package/lib/blocks/Referral/ReferralSettlement.d.ts +8 -0
- package/lib/blocks/Referral/ReferralStats.d.ts +8 -0
- package/lib/blocks/Referral/index.d.ts +3 -0
- package/lib/blocks/index.d.ts +1 -0
- package/lib/elements/HawaChip.d.ts +1 -0
- package/lib/elements/HawaCopyrights.d.ts +5 -5
- package/lib/elements/HawaItemCard.d.ts +14 -6
- package/lib/elements/HawaMenu.d.ts +2 -3
- package/lib/elements/HawaModal.d.ts +1 -0
- package/lib/elements/HawaSelect.d.ts +2 -1
- package/lib/elements/HawaTable.d.ts +2 -2
- package/lib/index.js +1 -1
- package/package.json +1 -1
- package/src/blocks/AuthForms/AppLanding.tsx +2 -1
- package/src/blocks/AuthForms/CodeConfirmation.tsx +7 -2
- package/src/blocks/AuthForms/NewPasswordForm.tsx +1 -6
- package/src/blocks/AuthForms/ResetPasswordForm.tsx +1 -4
- package/src/blocks/AuthForms/SignInForm.tsx +1 -1
- package/src/blocks/AuthForms/SignInPhone.tsx +1 -1
- package/src/blocks/AuthForms/SignUpForm.tsx +1 -1
- package/src/blocks/Payment/CheckoutForm.tsx +9 -0
- package/src/blocks/Referral/ReferralAccount.tsx +49 -0
- package/src/blocks/Referral/ReferralSettlement.tsx +110 -0
- package/src/blocks/Referral/ReferralStats.tsx +94 -0
- package/src/blocks/Referral/index.ts +3 -0
- package/src/blocks/index.ts +5 -4
- package/src/elements/HawaButton.tsx +21 -21
- package/src/elements/HawaChip.tsx +17 -6
- package/src/elements/HawaCopyrights.tsx +5 -5
- package/src/elements/HawaItemCard.tsx +83 -58
- package/src/elements/HawaMenu.tsx +49 -54
- package/src/elements/HawaModal.tsx +58 -52
- package/src/elements/HawaSelect.tsx +4 -2
- package/src/elements/HawaTable.tsx +2 -2
- package/src/elements/HawaTooltip.tsx +23 -16
- package/src/layout/HawaContainer.tsx +2 -2
- package/src/styles.css +108 -51
- package/storybook-static/209.d29fd715.iframe.bundle.js +2 -0
- package/storybook-static/{209.70afd616.iframe.bundle.js.LICENSE.txt → 209.d29fd715.iframe.bundle.js.LICENSE.txt} +11 -15
- package/storybook-static/{767.888009dba401078f3f72.manager.bundle.js → 767.2f9c96fa3338c8d16078.manager.bundle.js} +2 -2
- package/storybook-static/{767.888009dba401078f3f72.manager.bundle.js.LICENSE.txt → 767.2f9c96fa3338c8d16078.manager.bundle.js.LICENSE.txt} +19 -22
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/index.html +1 -1
- package/storybook-static/main.a1546405.iframe.bundle.js +1 -0
- package/storybook-static/project.json +1 -1
- package/storybook-static/runtime~main.4d0bf318.iframe.bundle.js +1 -0
- package/tailwind.config.js +1 -1
- package/storybook-static/209.70afd616.iframe.bundle.js +0 -2
- package/storybook-static/745.4b81597c.iframe.bundle.js +0 -1
- package/storybook-static/main.ff0dd517.iframe.bundle.js +0 -1
- package/storybook-static/runtime~main.968bd8b6.iframe.bundle.js +0 -1
package/package.json
CHANGED
|
@@ -11,10 +11,11 @@ type AppLandingTypes = {
|
|
|
11
11
|
signUp: string
|
|
12
12
|
lang: string
|
|
13
13
|
}
|
|
14
|
+
size: "small" | "normal" | "full"
|
|
14
15
|
}
|
|
15
16
|
export const AppLanding: React.FunctionComponent<AppLandingTypes> = (props) => {
|
|
16
17
|
return (
|
|
17
|
-
<HawaContainer>
|
|
18
|
+
<HawaContainer maxWidth={props.size}>
|
|
18
19
|
{props.handleSignIn && (
|
|
19
20
|
<HawaButton color="primary" width="full" onClick={props.handleSignIn}>
|
|
20
21
|
{props.texts.signIn}
|
|
@@ -7,7 +7,12 @@ type CodeConfirmationTypes = {
|
|
|
7
7
|
showError: any
|
|
8
8
|
errorTitle: any
|
|
9
9
|
errorText: any
|
|
10
|
-
texts:
|
|
10
|
+
texts: {
|
|
11
|
+
codeLabel: string
|
|
12
|
+
codePlaceholder: string
|
|
13
|
+
codeRequiredText: string
|
|
14
|
+
confirmText: string
|
|
15
|
+
}
|
|
11
16
|
handleSignIn: any
|
|
12
17
|
}
|
|
13
18
|
export const CodeConfirmation: React.FunctionComponent<
|
|
@@ -21,7 +26,7 @@ export const CodeConfirmation: React.FunctionComponent<
|
|
|
21
26
|
} = methods
|
|
22
27
|
|
|
23
28
|
return (
|
|
24
|
-
<HawaContainer>
|
|
29
|
+
<HawaContainer maxWidth="small">
|
|
25
30
|
{" "}
|
|
26
31
|
{props.showError && (
|
|
27
32
|
<HawaAlert
|
|
@@ -6,11 +6,7 @@ import { HawaContainer } from "../../layout"
|
|
|
6
6
|
type NewPasswordTypes = {
|
|
7
7
|
handleNewPassword: any
|
|
8
8
|
passwordChanged: any
|
|
9
|
-
errorText: any
|
|
10
9
|
texts: {
|
|
11
|
-
emailLabel: string
|
|
12
|
-
emailPlaceholder: string
|
|
13
|
-
emailRequiredText: string
|
|
14
10
|
passwordPlaceholder: string
|
|
15
11
|
updatePassword: string
|
|
16
12
|
passwordRequiredText: string
|
|
@@ -19,7 +15,6 @@ type NewPasswordTypes = {
|
|
|
19
15
|
confirmPasswordLabel: string
|
|
20
16
|
confirmPasswordRequiredText: string
|
|
21
17
|
passwordMatchError: string
|
|
22
|
-
forgotPasswordText: string
|
|
23
18
|
passwordChanged: string
|
|
24
19
|
}
|
|
25
20
|
handleSignIn: any
|
|
@@ -46,7 +41,7 @@ export const NewPasswordForm: React.FunctionComponent<NewPasswordTypes> = (
|
|
|
46
41
|
}
|
|
47
42
|
|
|
48
43
|
return (
|
|
49
|
-
<HawaContainer>
|
|
44
|
+
<HawaContainer maxWidth="small">
|
|
50
45
|
{" "}
|
|
51
46
|
{matchError && (
|
|
52
47
|
<HawaAlert text={props.texts.passwordMatchError} severity="error" />
|
|
@@ -5,10 +5,7 @@ import { HawaContainer } from "../../layout"
|
|
|
5
5
|
|
|
6
6
|
type ResetPasswordType = {
|
|
7
7
|
handleResetPassword: any
|
|
8
|
-
passwordChanged: any
|
|
9
|
-
errorText: any
|
|
10
8
|
sent: any
|
|
11
|
-
handleSignIn: any
|
|
12
9
|
texts: {
|
|
13
10
|
emailLabel: string
|
|
14
11
|
emailPlaceholder: string
|
|
@@ -30,7 +27,7 @@ export const ResetPasswordForm: React.FunctionComponent<ResetPasswordType> = (
|
|
|
30
27
|
control,
|
|
31
28
|
} = methods
|
|
32
29
|
return (
|
|
33
|
-
<HawaContainer>
|
|
30
|
+
<HawaContainer maxWidth="small">
|
|
34
31
|
{" "}
|
|
35
32
|
{!props.sent ? (
|
|
36
33
|
<form onSubmit={handleSubmit(props.handleResetPassword)}>
|
|
@@ -57,7 +57,7 @@ export const SignInForm: React.FunctionComponent<SignInFormTypes> = (props) => {
|
|
|
57
57
|
} = useForm()
|
|
58
58
|
|
|
59
59
|
return (
|
|
60
|
-
<HawaContainer>
|
|
60
|
+
<HawaContainer maxWidth="small">
|
|
61
61
|
<form onSubmit={handleSubmit(props.handleSignIn)}>
|
|
62
62
|
{props.showError && (
|
|
63
63
|
<HawaAlert
|
|
@@ -27,7 +27,7 @@ export const SignInPhone: React.FunctionComponent<SignInPhoneTypes> = (
|
|
|
27
27
|
console.log("submitting ", userPhone)
|
|
28
28
|
}
|
|
29
29
|
return (
|
|
30
|
-
<HawaContainer>
|
|
30
|
+
<HawaContainer maxWidth="small">
|
|
31
31
|
<form
|
|
32
32
|
onSubmit={handleSubmit(() => console.log("testing submit"))}
|
|
33
33
|
// onSubmit={(e) => {
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
} from "../../elements"
|
|
8
8
|
import { Controller, FormProvider, useForm } from "react-hook-form"
|
|
9
9
|
import { HawaContainer } from "../../layout"
|
|
10
|
+
import countries from "../../countries"
|
|
10
11
|
|
|
11
12
|
type CheckoutFormTypes = {
|
|
12
13
|
lang: string
|
|
@@ -242,6 +243,14 @@ export const CheckoutForm: React.FunctionComponent<CheckoutFormTypes> = (
|
|
|
242
243
|
// displayEmpty
|
|
243
244
|
// disableUnderline
|
|
244
245
|
// validators={["required"]}
|
|
246
|
+
options={countries}
|
|
247
|
+
getOptionLabel={(countries) => countries.country_label}
|
|
248
|
+
// options={[
|
|
249
|
+
// { label: "Saudi Arabia", value: "saudi_arabia" },
|
|
250
|
+
// { label: "Saudi Arabia", value: "saudi_arabia" },
|
|
251
|
+
// { label: "Saudi Arabia", value: "saudi_arabia" },
|
|
252
|
+
// { label: "Saudi Arabia", value: "saudi_arabia" },
|
|
253
|
+
// ]}
|
|
245
254
|
{...field}
|
|
246
255
|
value={field.value ?? ""}
|
|
247
256
|
>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import { FaClone } from "react-icons/fa"
|
|
3
|
+
import { HawaAlert, HawaButton, HawaTable, HawaTooltip } from "../../elements"
|
|
4
|
+
import { HawaContainer } from "../../layout"
|
|
5
|
+
|
|
6
|
+
type ReferralAccount = {
|
|
7
|
+
referralLink: string
|
|
8
|
+
referralCode: string
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const ReferralAccount: React.FunctionComponent<ReferralAccount> = ({
|
|
12
|
+
referralLink,
|
|
13
|
+
referralCode,
|
|
14
|
+
}) => {
|
|
15
|
+
return (
|
|
16
|
+
<HawaContainer maxWidth="normal">
|
|
17
|
+
<div className="my-2 mt-0">
|
|
18
|
+
<div className="mb-1">Referral Code</div>
|
|
19
|
+
<div className="flex flex-row items-center justify-between rounded-lg bg-white">
|
|
20
|
+
<span className="ml-3 font-bold">{referralCode}</span>
|
|
21
|
+
<HawaButton
|
|
22
|
+
tooltip="Copy"
|
|
23
|
+
className="mr-1.5"
|
|
24
|
+
onClick={() => navigator.clipboard.writeText(referralCode)}
|
|
25
|
+
>
|
|
26
|
+
<span className="bg-red flex items-center justify-center">
|
|
27
|
+
<FaClone />
|
|
28
|
+
</span>
|
|
29
|
+
</HawaButton>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
<div className="my-2 mt-0">
|
|
33
|
+
<div className="mb-1">Referral Link</div>
|
|
34
|
+
<div className="flex flex-row items-center justify-between rounded-lg bg-white">
|
|
35
|
+
<span className="ml-3 font-bold">{referralLink}</span>
|
|
36
|
+
<HawaButton
|
|
37
|
+
tooltip="Copy"
|
|
38
|
+
className="mr-1.5"
|
|
39
|
+
onClick={() => navigator.clipboard.writeText(referralLink)}
|
|
40
|
+
>
|
|
41
|
+
<span className="bg-red flex items-center justify-center">
|
|
42
|
+
<FaClone />
|
|
43
|
+
</span>
|
|
44
|
+
</HawaButton>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
</HawaContainer>
|
|
48
|
+
)
|
|
49
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import { FaTimes } from "react-icons/fa"
|
|
3
|
+
import {
|
|
4
|
+
HawaAlert,
|
|
5
|
+
HawaButton,
|
|
6
|
+
HawaChip,
|
|
7
|
+
HawaSelect,
|
|
8
|
+
HawaTextField,
|
|
9
|
+
} from "../../elements"
|
|
10
|
+
import { HawaContainer } from "../../layout"
|
|
11
|
+
import { Controller, FormProvider, useForm } from "react-hook-form"
|
|
12
|
+
|
|
13
|
+
type TReferralSettlement = {
|
|
14
|
+
referralLink: string
|
|
15
|
+
referralCode: string
|
|
16
|
+
withdrawError?: string
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const ReferralSettlement: React.FunctionComponent<
|
|
20
|
+
TReferralSettlement
|
|
21
|
+
> = ({ referralLink, referralCode, withdrawError }) => {
|
|
22
|
+
const methods = useForm()
|
|
23
|
+
const {
|
|
24
|
+
formState: { errors },
|
|
25
|
+
handleSubmit,
|
|
26
|
+
control,
|
|
27
|
+
} = methods
|
|
28
|
+
return (
|
|
29
|
+
<HawaContainer maxWidth="normal">
|
|
30
|
+
<div>
|
|
31
|
+
<FormProvider {...methods}>
|
|
32
|
+
<HawaTextField label={"IBAN"} />
|
|
33
|
+
<HawaTextField label={"Holder Name"} />
|
|
34
|
+
<Controller
|
|
35
|
+
control={control}
|
|
36
|
+
name="bank"
|
|
37
|
+
render={({ field }) => (
|
|
38
|
+
<HawaSelect
|
|
39
|
+
label="Bank"
|
|
40
|
+
isCreatable={false}
|
|
41
|
+
isMulti={false ?? false}
|
|
42
|
+
isSearchable={false}
|
|
43
|
+
isClearable={false ?? false}
|
|
44
|
+
options={[
|
|
45
|
+
{ value: "snb", label: "Saudi National Bank" },
|
|
46
|
+
{ value: "bilad", label: "Al Bilad Bank" },
|
|
47
|
+
{ value: "rajihi", label: "Al Rajihi Bank" },
|
|
48
|
+
]}
|
|
49
|
+
onInputChange={(e: any, o: any) => console.log("changing", e)}
|
|
50
|
+
{...field}
|
|
51
|
+
onChange={(e: any, o: any) => console.log("chooo", e)}
|
|
52
|
+
/>
|
|
53
|
+
)}
|
|
54
|
+
/>
|
|
55
|
+
</FormProvider>
|
|
56
|
+
</div>
|
|
57
|
+
<div>
|
|
58
|
+
<HawaButton width="full">Add Bank Account</HawaButton>
|
|
59
|
+
</div>
|
|
60
|
+
{withdrawError && (
|
|
61
|
+
<div>
|
|
62
|
+
<HawaAlert
|
|
63
|
+
text={
|
|
64
|
+
"Sorry can't withdraw the money at the moment. Please try again in 2022/11/20"
|
|
65
|
+
}
|
|
66
|
+
severity="warning"
|
|
67
|
+
/>
|
|
68
|
+
</div>
|
|
69
|
+
)}
|
|
70
|
+
<div className="mt-3">
|
|
71
|
+
<div className="mb-1">Settlement Accounts</div>
|
|
72
|
+
<div className="rounded-lg">
|
|
73
|
+
<SettlementAccountCard
|
|
74
|
+
bank="Al Inma Bank"
|
|
75
|
+
iban="SA10228094028098329119"
|
|
76
|
+
accountHolder="Zakher Masri"
|
|
77
|
+
default
|
|
78
|
+
/>
|
|
79
|
+
<SettlementAccountCard
|
|
80
|
+
bank="Al Rajihi Bank"
|
|
81
|
+
iban="SA10228094028098329119"
|
|
82
|
+
accountHolder="Zakher Masri"
|
|
83
|
+
/>
|
|
84
|
+
<SettlementAccountCard
|
|
85
|
+
bank="Al Inma Bank"
|
|
86
|
+
iban="SA10228094028098329119"
|
|
87
|
+
accountHolder="Zakher Masri"
|
|
88
|
+
/>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
</HawaContainer>
|
|
92
|
+
)
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const SettlementAccountCard = (props) => (
|
|
96
|
+
<div className="mb-3 flex flex-row items-center justify-between rounded-lg border-b bg-white p-2">
|
|
97
|
+
<div className="flex flex-col justify-between">
|
|
98
|
+
<div className="text-xs">{props.bank}</div>
|
|
99
|
+
<div>{props.accountHolder}</div>
|
|
100
|
+
<div className="text-xs">{props.iban}</div>
|
|
101
|
+
</div>
|
|
102
|
+
<div className="flex flex-row items-center justify-center gap-1">
|
|
103
|
+
{props.default && <HawaChip size="normal" label="Default" />}
|
|
104
|
+
{!props.default && <HawaButton size="small">Make Default</HawaButton>}
|
|
105
|
+
<HawaButton tooltip="Delete">
|
|
106
|
+
<FaTimes />
|
|
107
|
+
</HawaButton>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
)
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import { FaClone } from "react-icons/fa"
|
|
3
|
+
import { HawaAlert, HawaButton } from "../../elements"
|
|
4
|
+
import { HawaContainer } from "../../layout"
|
|
5
|
+
|
|
6
|
+
type TReferralStats = {
|
|
7
|
+
referralLink: string
|
|
8
|
+
referralCode: string
|
|
9
|
+
withdrawError?: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const ReferralStats: React.FunctionComponent<TReferralStats> = ({
|
|
13
|
+
referralLink,
|
|
14
|
+
referralCode,
|
|
15
|
+
withdrawError,
|
|
16
|
+
}) => {
|
|
17
|
+
return (
|
|
18
|
+
<HawaContainer maxWidth="normal">
|
|
19
|
+
<div className="mb-1">Stats</div>
|
|
20
|
+
<div className="justi flex flex-row gap-1">
|
|
21
|
+
<NumberCard title="Clicks" number={22} />
|
|
22
|
+
<NumberCard title="Sign-ups" number={32} />
|
|
23
|
+
<NumberCard title="Commission" number={"213.22 SAR"} />
|
|
24
|
+
</div>
|
|
25
|
+
<div>
|
|
26
|
+
<HawaButton width="full">Withdraw Money</HawaButton>
|
|
27
|
+
</div>
|
|
28
|
+
{withdrawError && (
|
|
29
|
+
<div>
|
|
30
|
+
<HawaAlert
|
|
31
|
+
text={
|
|
32
|
+
"Sorry can't withdraw the money at the moment. Please try again in 2022/11/20"
|
|
33
|
+
}
|
|
34
|
+
severity="warning"
|
|
35
|
+
/>
|
|
36
|
+
</div>
|
|
37
|
+
)}
|
|
38
|
+
<div className="mt-3">
|
|
39
|
+
<div className="mb-1">Sign ups</div>
|
|
40
|
+
<div className="rounded-lg">
|
|
41
|
+
{/* <HawaTable
|
|
42
|
+
columns={["date", "email", "amount"]}
|
|
43
|
+
rows={[
|
|
44
|
+
["2020/10/11 @ 9:45 pm", "sadsd", "dsodk"],
|
|
45
|
+
["2020/10/11 @ 9:45 pm", "sadsd", "dsodk"],
|
|
46
|
+
["2020/10/11 @ 9:45 pm", "sadsd", "dsodk"],
|
|
47
|
+
]}
|
|
48
|
+
/> */}
|
|
49
|
+
<ReferralSignUpCard
|
|
50
|
+
date="2020/10/11 @ 9:45 pm"
|
|
51
|
+
email="zakher@sikka.io"
|
|
52
|
+
amount="3.4 SAR / Month"
|
|
53
|
+
/>
|
|
54
|
+
<ReferralSignUpCard
|
|
55
|
+
date="2022/10/11 @ 9:45 pm"
|
|
56
|
+
email="zakher@sikka.io"
|
|
57
|
+
amount="3.4 SAR / Month"
|
|
58
|
+
/>
|
|
59
|
+
<ReferralSignUpCard
|
|
60
|
+
date="2022/10/11 @ 9:45 pm"
|
|
61
|
+
email="zakher@sikka.io"
|
|
62
|
+
amount="3.4 SAR / Month"
|
|
63
|
+
/>
|
|
64
|
+
<ReferralSignUpCard
|
|
65
|
+
date="2022/10/11 @ 9:45 pm"
|
|
66
|
+
email="zakher@sikka.io"
|
|
67
|
+
amount="3.4 SAR / Month"
|
|
68
|
+
/>
|
|
69
|
+
<ReferralSignUpCard
|
|
70
|
+
date="2022/10/11 @ 9:45 pm"
|
|
71
|
+
email="zakher@sikka.io"
|
|
72
|
+
amount="3.4 SAR / Month"
|
|
73
|
+
/>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
</HawaContainer>
|
|
77
|
+
)
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const NumberCard = (props) => (
|
|
81
|
+
<div className="w-full rounded-lg bg-white p-2">
|
|
82
|
+
<div className="text-sm">{props.title}</div>
|
|
83
|
+
<div className="font-bold">{props.number}</div>
|
|
84
|
+
</div>
|
|
85
|
+
)
|
|
86
|
+
const ReferralSignUpCard = (props) => (
|
|
87
|
+
<div className="mb-3 rounded-lg border-b bg-white p-2">
|
|
88
|
+
<div className="text-xs">{props.date}</div>
|
|
89
|
+
<div className="flex flex-row justify-between">
|
|
90
|
+
<div>{props.email}</div>
|
|
91
|
+
<div>{props.amount}</div>
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
)
|
package/src/blocks/index.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export * from "./Account"
|
|
2
|
-
export * from "./AuthForms"
|
|
3
|
-
export * from "./Payment"
|
|
4
|
-
export * from "./Pricing"
|
|
1
|
+
export * from "./Account"
|
|
2
|
+
export * from "./AuthForms"
|
|
3
|
+
export * from "./Payment"
|
|
4
|
+
export * from "./Pricing"
|
|
5
|
+
export * from "./Referral"
|
|
@@ -35,7 +35,7 @@ const colorStyles = {
|
|
|
35
35
|
primary:
|
|
36
36
|
"text-white bg-primary-default hover:bg-primary-700 hover:text-white",
|
|
37
37
|
secondary:
|
|
38
|
-
"text-neutral-900 bg-secondary-default hover:bg-secondary-700
|
|
38
|
+
"text-neutral-900 bg-secondary-default hover:text-white hover:bg-secondary-700",
|
|
39
39
|
},
|
|
40
40
|
outlined: {
|
|
41
41
|
default: "text-gray-600 border-gray-600 hover:bg-gray-200",
|
|
@@ -64,25 +64,6 @@ export function HawaButton({
|
|
|
64
64
|
}: ButtonProps) {
|
|
65
65
|
const [isHovered, setIsHovered] = React.useState(false)
|
|
66
66
|
|
|
67
|
-
const buttonClass = disabled
|
|
68
|
-
? clsx(
|
|
69
|
-
className,
|
|
70
|
-
baseStyles,
|
|
71
|
-
variantStyles[variant],
|
|
72
|
-
sizeStyles[size],
|
|
73
|
-
widthStyles[width],
|
|
74
|
-
disabledSyles,
|
|
75
|
-
disabledVariantSyles[variant]
|
|
76
|
-
)
|
|
77
|
-
: clsx(
|
|
78
|
-
className,
|
|
79
|
-
baseStyles,
|
|
80
|
-
variantStyles[variant],
|
|
81
|
-
sizeStyles[size],
|
|
82
|
-
colorStyles[variant][color],
|
|
83
|
-
widthStyles[width]
|
|
84
|
-
)
|
|
85
|
-
|
|
86
67
|
return (
|
|
87
68
|
<div className="relative my-2">
|
|
88
69
|
<button
|
|
@@ -92,7 +73,26 @@ export function HawaButton({
|
|
|
92
73
|
onMouseLeave={() => {
|
|
93
74
|
setIsHovered(false)
|
|
94
75
|
}}
|
|
95
|
-
className={
|
|
76
|
+
className={
|
|
77
|
+
disabled
|
|
78
|
+
? clsx(
|
|
79
|
+
className,
|
|
80
|
+
baseStyles,
|
|
81
|
+
variantStyles[variant],
|
|
82
|
+
sizeStyles[size],
|
|
83
|
+
widthStyles[width],
|
|
84
|
+
disabledSyles,
|
|
85
|
+
disabledVariantSyles[variant]
|
|
86
|
+
)
|
|
87
|
+
: clsx(
|
|
88
|
+
className,
|
|
89
|
+
baseStyles,
|
|
90
|
+
variantStyles[variant],
|
|
91
|
+
sizeStyles[size],
|
|
92
|
+
colorStyles[variant][color],
|
|
93
|
+
widthStyles[width]
|
|
94
|
+
)
|
|
95
|
+
}
|
|
96
96
|
disabled={disabled}
|
|
97
97
|
{...props}
|
|
98
98
|
>
|
|
@@ -1,12 +1,23 @@
|
|
|
1
|
+
import clsx from "clsx"
|
|
1
2
|
import React from "react"
|
|
2
3
|
|
|
3
4
|
type TChipTypes = {
|
|
4
5
|
label: string
|
|
6
|
+
size: "small" | "normal" | "large"
|
|
5
7
|
}
|
|
6
|
-
export const HawaChip: React.FunctionComponent<TChipTypes> = (
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
export const HawaChip: React.FunctionComponent<TChipTypes> = ({
|
|
9
|
+
size = "normal",
|
|
10
|
+
label,
|
|
11
|
+
}) => {
|
|
12
|
+
// small: "text-xs px-2.5 py-1.5",
|
|
13
|
+
// medium: "text-sm leading-4 px-3 py-2",
|
|
14
|
+
// large: "text-sm px-4 py-2",
|
|
15
|
+
let defaultStyles =
|
|
16
|
+
"rounded-lg bg-blue-200 px-2.5 py-0.5 font-bold text-blue-800 dark:bg-blue-200 dark:text-blue-800"
|
|
17
|
+
let sizeStyles = {
|
|
18
|
+
small: "h-fit text-xs",
|
|
19
|
+
normal: "h-full leading-4 px-3 py-2 text-xs ",
|
|
20
|
+
large: "",
|
|
21
|
+
}
|
|
22
|
+
return <span className={clsx(defaultStyles, sizeStyles[size])}>{label}</span>
|
|
12
23
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { useEffect, useState } from "react"
|
|
2
2
|
|
|
3
3
|
type CopyRightsTypes = {
|
|
4
|
-
withLogo
|
|
5
|
-
lang
|
|
6
|
-
version
|
|
7
|
-
credits
|
|
8
|
-
logoURL
|
|
4
|
+
withLogo?: boolean
|
|
5
|
+
lang?: any
|
|
6
|
+
version?: string
|
|
7
|
+
credits?: string
|
|
8
|
+
logoURL?: string
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export const HawaCopyrights: React.FunctionComponent<CopyRightsTypes> = (
|