@boneframework/native-components 1.0.30 → 1.0.32

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": "@boneframework/native-components",
3
- "version": "1.0.30",
3
+ "version": "1.0.32",
4
4
  "description": "Expo Components for Bone Framework",
5
5
  "main": "src/Bone.ts",
6
6
  "scripts": {
@@ -0,0 +1,49 @@
1
+ import {StyleSheet, View} from "react-native";
2
+
3
+ import Text from '../components/Text';
4
+ import Button from "../components/Button";
5
+ import Button from "../components/Image";
6
+
7
+ import colors from "../../../../config/colors";
8
+
9
+ function ResendActivationScreen({tokenError, submitCallback}) {
10
+
11
+ return (
12
+ <View style={styles.container}>
13
+ <Image style={styles.logo} source={require('../../../../assets/logo.png')} />
14
+ <Text style={styles.tokenError}>{tokenError}</Text>
15
+ <Text style={styles.resendText}>You will need a fresh acivation email in order to continue creating your account.</Text>
16
+ <Button color={'primary'} title={'Resend email'} onPress={submitCallback}/>
17
+ </View>
18
+ );
19
+ }
20
+
21
+ const styles = StyleSheet.create({
22
+ container: {
23
+ flex: 1,
24
+ justifyContent: 'center',
25
+ },
26
+ logo: {
27
+ width: 150,
28
+ height: 105,
29
+ alignSelf: "center",
30
+ marginTop: 50,
31
+ marginBottom: 20,
32
+ },
33
+ resendText: {
34
+ color: colors.white,
35
+ fontSize: 17,
36
+ marginBottom: 20,
37
+ textAlign: 'center'
38
+ },
39
+ tokenError: {
40
+ color: colors.white,
41
+ fontSize: 25,
42
+ marginBottom: 10,
43
+ textAlign: 'center'
44
+ },
45
+ })
46
+
47
+ export default ResendActivationScreen;
48
+
49
+
@@ -0,0 +1,64 @@
1
+ import React, {useState} from 'react';
2
+ import {Keyboard, StyleSheet, View} from "react-native";
3
+ import * as Yup from "yup";
4
+
5
+ import {ErrorMessage, Form, FormField, SubmitButton} from "../components/forms";
6
+ import Image from "../components/Image";
7
+
8
+ import settings from "../../../../config/settings";
9
+
10
+ const validationSchema = Yup.object().shape({
11
+ password: Yup.string().required().min(4).label('Password'),
12
+ confirm: Yup.string().required().oneOf([Yup.ref('password'), null], 'Passwords must match').label('Confirm')
13
+ });
14
+
15
+ function SetPasswordScreen({submitCallback, error}) {
16
+
17
+ return(
18
+ <View style={styles.container}>
19
+ <Image style={styles.logo} source={require('../../../../assets/logo.png')} />
20
+ <Form
21
+ initialValues={{ password: '', confirm: ''}}
22
+ onSubmit={submitCallback}
23
+ validationSchema={validationSchema}
24
+ >
25
+ <ErrorMessage error={error} visible={error} />
26
+ <FormField
27
+ name="password"
28
+ autoCaptitalize="none"
29
+ autoCorrect={false}
30
+ icon="lock"
31
+ placeholder="Password"
32
+ secureTextEntry
33
+ textContentType="password"
34
+ />
35
+ <FormField
36
+ name="confirm"
37
+ autoCaptitalize="none"
38
+ autoCorrect={false}
39
+ icon="lock"
40
+ placeholder="Confirm password"
41
+ secureTextEntry
42
+ textContentType="password"
43
+ />
44
+ <SubmitButton color="primary" title="Set Password" />
45
+ </Form>
46
+ </View>
47
+ );
48
+ }
49
+
50
+ const styles = StyleSheet.create({
51
+ container: {
52
+ flex: 1,
53
+ paddingHorizontal: 20
54
+ },
55
+ logo: {
56
+ width: 150,
57
+ height: 105,
58
+ alignSelf: "center",
59
+ marginTop: 50,
60
+ marginBottom: 20,
61
+ },
62
+ })
63
+
64
+ export default SetPasswordScreen;