@sikka/hawa 0.0.85 → 0.0.87

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.0.85",
3
+ "version": "0.0.87",
4
4
  "description": "UI Kit",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.es.js",
@@ -1,62 +1,36 @@
1
1
  import React from "react";
2
- import {
3
- HawaTextField,
4
- HawaLogoButton,
5
- HawaAlert,
6
- HawaButton
7
- } from "../../elements";
8
- import { Controller, useForm } from "react-hook-form";
2
+ import { HawaButton } from "../../elements";
9
3
  import PropTypes from "prop-types";
10
4
  import { HawaContainer } from "../../layout/HawaContainer";
11
5
 
12
6
  export const AppLanding = (props) => {
13
- const methods = useForm();
14
- const {
15
- formState: { errors },
16
- handleSubmit,
17
- control
18
- } = methods;
19
-
20
7
  return (
21
8
  <HawaContainer>
22
- <HawaButton fullWidth text={"Sign In"} />
23
- <HawaButton fullWidth text={"Sign Up"} />
24
- <HawaButton fullWidth text={"عربي"} />
9
+ <HawaButton
10
+ fullWidth
11
+ text={props.texts.signIn}
12
+ onClick={props.handleSignIn}
13
+ />
14
+ <HawaButton
15
+ fullWidth
16
+ text={props.texts.signUp}
17
+ onClick={props.handleSignUp}
18
+ />
19
+ <HawaButton
20
+ fullWidth
21
+ text={props.texts.langauge}
22
+ onClick={props.handleLangauge}
23
+ />
25
24
  </HawaContainer>
26
25
  );
27
26
  };
28
27
  AppLanding.propTypes = {
29
- /**
30
- * An object of all the texts in the blocks
31
- */
32
28
  texts: PropTypes.shape({
33
- emailLabel: PropTypes.string,
34
- emailPlaceholder: PropTypes.string,
35
- emailRequiredText: PropTypes.string,
36
- emailInvalidText: PropTypes.string,
37
- usernameLabel: PropTypes.string,
38
- usernamePlaceholder: PropTypes.string,
39
- usernameRequired: PropTypes.string,
40
- passwordLabel: PropTypes.string,
41
- passwordPlaceholder: PropTypes.string,
42
- passwordRequiredText: PropTypes.string,
43
- forgotPasswordText: PropTypes.string,
44
- newUserText: PropTypes.string,
45
- signUpText: PropTypes.string,
46
- signInText: PropTypes.string,
47
- googleButtonLabel: PropTypes.string,
48
- githubButtonLabel: PropTypes.string,
49
- twitterButtonLabel: PropTypes.string
29
+ signIn: PropTypes.string,
30
+ signUp: PropTypes.string,
31
+ language: PropTypes.string
50
32
  }),
51
- viaGoogle: PropTypes.bool,
52
- viaGithub: PropTypes.bool,
53
- viaTwitter: PropTypes.bool,
54
33
  handleSignIn: PropTypes.func,
55
- handleRouteToSignUp: PropTypes.func,
56
- handleGoogleSignIn: PropTypes.func,
57
- handleGithubSignIn: PropTypes.func,
58
- handleTwitterSignIn: PropTypes.func,
59
- handleForgotPassword: PropTypes.func,
60
-
61
- withoutSignUp: PropTypes.bool
34
+ handleSignUp: PropTypes.func,
35
+ handleLangauge: PropTypes.func
62
36
  };
@@ -155,9 +155,9 @@ export const SignUpForm = (props) => {
155
155
  isSearchable={false}
156
156
  isClearable={false ?? false}
157
157
  options={[
158
- { value: "chocolate", label: "Chocolate" },
159
- { value: "strawberry", label: "Strawberry" },
160
- { value: "vanilla", label: "Vanilla" }
158
+ { value: "friend", label: "From a friend" },
159
+ { value: "ad", label: "Advertisement" },
160
+ { value: "other", label: "Other" }
161
161
  ]}
162
162
  onChange={(e, o) => console.log("chooo", e)}
163
163
  onInputChange={(e, o) => console.log("changing", e)}
@@ -4,3 +4,4 @@ export * from "./SignUpForm.js";
4
4
  export * from "./SignInForm.js";
5
5
  export * from "./CodeConfirmation.js";
6
6
  export * from "./SignInPhone";
7
+ export * from "./AppLanding";
@@ -9,7 +9,6 @@ export const HawaButton = ({
9
9
  text,
10
10
  isLoading = false,
11
11
  loadingText,
12
- onClick,
13
12
  ...props
14
13
  }) => {
15
14
  const [loading, setLoading] = useState(isLoading);
@@ -29,7 +28,6 @@ export const HawaButton = ({
29
28
  data-tooltip-target={tooltip}
30
29
  type="button"
31
30
  className={styles}
32
- onClick={() => console.log("clicking")}
33
31
  disabled={isLoading}
34
32
  {...props}
35
33
  >
@@ -57,6 +55,5 @@ HawaButton.PropTypes = {
57
55
  iconOnly: PropTypes.bool,
58
56
  text: PropTypes.string,
59
57
  isLoading: PropTypes.bool,
60
- loadingText: PropTypes.string,
61
- onClick : PropTypes.func
58
+ loadingText: PropTypes.string
62
59
  };