@sikka/hawa 0.1.12 → 0.1.14
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 +4 -0
- package/es/elements/Button.d.ts +1 -1
- package/es/elements/InterfaceSettings.d.ts +2 -2
- package/es/index.es.js +2 -2
- package/lib/elements/Button.d.ts +1 -1
- package/lib/elements/InterfaceSettings.d.ts +2 -2
- package/lib/index.js +2 -2
- package/package.json +1 -1
- package/src/elements/Button.tsx +2 -0
- package/src/elements/InterfaceSettings.tsx +15 -7
- package/src/styles.css +4 -0
- package/src/translations/ar.json +12 -1
- package/src/translations/en.json +12 -1
package/package.json
CHANGED
package/src/elements/Button.tsx
CHANGED
|
@@ -1,18 +1,23 @@
|
|
|
1
|
-
import React, { FC } from "react"
|
|
1
|
+
import React, { FC, useState } from "react"
|
|
2
2
|
import { HawaRadio } from "./HawaRadio"
|
|
3
3
|
|
|
4
4
|
type TypographyTypes = {
|
|
5
|
-
handleLanguage: () => void
|
|
5
|
+
handleLanguage: (e) => void
|
|
6
6
|
currentLanguage: any
|
|
7
|
-
handleColorMode: () => void
|
|
7
|
+
handleColorMode: (e) => void
|
|
8
8
|
currentColorMode: any
|
|
9
9
|
}
|
|
10
10
|
export const InterfaceSettings: FC<TypographyTypes> = (props) => {
|
|
11
|
+
const [color, setColor] = useState(props.currentColorMode)
|
|
12
|
+
const [language, setLanguage] = useState(props.currentLanguage)
|
|
11
13
|
return (
|
|
12
14
|
<div className="mt-6 flex flex-row justify-between">
|
|
13
15
|
<HawaRadio
|
|
14
|
-
defaultValue={
|
|
15
|
-
onChangeTab={
|
|
16
|
+
defaultValue={language}
|
|
17
|
+
onChangeTab={(e) => {
|
|
18
|
+
props.handleLanguage(e)
|
|
19
|
+
setLanguage(e)
|
|
20
|
+
}}
|
|
16
21
|
design="tabs"
|
|
17
22
|
options={[
|
|
18
23
|
{ value: "ar", label: "عربي" },
|
|
@@ -20,8 +25,11 @@ export const InterfaceSettings: FC<TypographyTypes> = (props) => {
|
|
|
20
25
|
]}
|
|
21
26
|
/>
|
|
22
27
|
<HawaRadio
|
|
23
|
-
defaultValue={
|
|
24
|
-
onChangeTab={
|
|
28
|
+
defaultValue={color}
|
|
29
|
+
onChangeTab={(e) => {
|
|
30
|
+
props.handleColorMode(e)
|
|
31
|
+
setColor(e)
|
|
32
|
+
}}
|
|
25
33
|
design="tabs"
|
|
26
34
|
options={[
|
|
27
35
|
{
|
package/src/styles.css
CHANGED
package/src/translations/ar.json
CHANGED
|
@@ -26,5 +26,16 @@
|
|
|
26
26
|
"signInViaTwitterLabel": "الدخول بواسطة Twitter",
|
|
27
27
|
"signUpViaGoogleLabel": "التسجيل بواسطة Google",
|
|
28
28
|
"signUpViaGithubLabel": "التسجيل بواسطة Github",
|
|
29
|
-
"signUpViaTwitterLabel": "التسجيل بواسطة Twitter"
|
|
29
|
+
"signUpViaTwitterLabel": "التسجيل بواسطة Twitter",
|
|
30
|
+
|
|
31
|
+
"fullNameRequiredText": "الإسم الكامل مطلوب",
|
|
32
|
+
"passwordTooShortText": "كلمة المرور قصيرة",
|
|
33
|
+
"subscribeToNewsletter": "إشترك في النشرة الإخبارية",
|
|
34
|
+
"confirmPasswordLabel": "تأكيد كلمة المرور",
|
|
35
|
+
"confirmPasswordPlaceholder": "تأكيد كلمة المرور",
|
|
36
|
+
"iAcceptText": "أوافق على",
|
|
37
|
+
"termsText": "الشروط والأحكام",
|
|
38
|
+
"termsRequiredText": "يجب الموافقة على الشروط والأحكام للإستمرار",
|
|
39
|
+
"existingUserText": "لديك حساب؟",
|
|
40
|
+
"refCode": "رمز الإحالة"
|
|
30
41
|
}
|
package/src/translations/en.json
CHANGED
|
@@ -25,5 +25,16 @@
|
|
|
25
25
|
"signInViaTwitterLabel": "Sign in with Twitter",
|
|
26
26
|
"signUpViaGoogleLabel": "Sign up with Google",
|
|
27
27
|
"signUpViaGithubLabel": "Sign up with Github",
|
|
28
|
-
"signUpViaTwitterLabel": "Sign up with Twitter"
|
|
28
|
+
"signUpViaTwitterLabel": "Sign up with Twitter",
|
|
29
|
+
|
|
30
|
+
"fullNameRequiredText": "Full name is required",
|
|
31
|
+
"passwordTooShortText": "Password too short",
|
|
32
|
+
"subscribeToNewsletter": "Subscribe to newsletter?",
|
|
33
|
+
"confirmPasswordLabel": "Confirm Password",
|
|
34
|
+
"confirmPasswordPlaceholder": "Minimum 8 characters",
|
|
35
|
+
"iAcceptText": "I accept the",
|
|
36
|
+
"termsText": "terms & conditions",
|
|
37
|
+
"termsRequiredText": "you must accept the terms & conditions",
|
|
38
|
+
"existingUserText": "Existing User?",
|
|
39
|
+
"refCode": "Referral Code"
|
|
29
40
|
}
|