mg-library 1.0.547 → 1.0.549
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/blocks.js +2 -1
- package/functions.js +21 -2
- package/package.json +1 -1
package/blocks.js
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
import { useCallback, useState, useEffect } from 'react';
|
2
2
|
import { useForm, Controller } from 'react-hook-form';
|
3
3
|
import { View, ActivityIndicator, Pressable, Image, FlatList, Keyboard, Dimensions } from 'react-native';
|
4
|
-
import { Text,
|
4
|
+
import { Text, Button, Popover, Card, Layout, Input } from '@ui-kitten/components';
|
5
5
|
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
|
6
6
|
import * as ImageManipulator from 'expo-image-manipulator';
|
7
7
|
import { Camera, CameraType, CameraView } from 'expo-camera';
|
8
8
|
import axios from 'axios';
|
9
|
+
import { Divider } from 'native-base';
|
9
10
|
import { uploadFile } from '@uploadcare/upload-client';
|
10
11
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
11
12
|
|
package/functions.js
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
import Toast from 'react-native-root-toast';
|
2
2
|
import { StyleSheet, View, Dimensions } from 'react-native';
|
3
3
|
import AsyncStorage from '@react-native-async-storage/async-storage';
|
4
|
-
import { Text, Button
|
4
|
+
import { Text, Button } from '@ui-kitten/components';
|
5
|
+
import { Box } from 'native-base';
|
5
6
|
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
|
6
7
|
import moment from 'moment';
|
7
8
|
import 'moment/locale/es';
|
@@ -17,7 +18,7 @@ const logoutIcon = () => (
|
|
17
18
|
<MaterialCommunityIcons name='logout' color='white' size={20} style={{ flex: 1 }} />
|
18
19
|
);
|
19
20
|
|
20
|
-
export function navigatorHeader(insets, theme, onPressLogout, company) {
|
21
|
+
/* export function navigatorHeader(insets, theme, onPressLogout, company) {
|
21
22
|
let companyDescription = company.description;
|
22
23
|
if (companyDescription.length > 25)
|
23
24
|
companyDescription = companyDescription.substring(0, 25) + '...';
|
@@ -33,6 +34,24 @@ export function navigatorHeader(insets, theme, onPressLogout, company) {
|
|
33
34
|
</View>
|
34
35
|
</Layout>
|
35
36
|
);
|
37
|
+
} */
|
38
|
+
|
39
|
+
export function navigatorHeader(insets, theme, onPressLogout, company) {
|
40
|
+
let companyDescription = company.description;
|
41
|
+
if (companyDescription.length > 25)
|
42
|
+
companyDescription = companyDescription.substring(0, 25) + '...';
|
43
|
+
return (
|
44
|
+
<Box style={[safeAreaViewForNavigatorHeaderStyleSheet(insets).safeAreaView, { backgroundColor: theme['color-primary-500'], flexDirection: 'column', justifyContent: 'flex-end' }]}>
|
45
|
+
<View style={{ flexDirection: 'row', flexGrow: 1 }}>
|
46
|
+
<View style={{ flexGrow: 0.9, marginLeft: 10, alignSelf: 'center' }}>
|
47
|
+
<Text category='h5' style={{ color: 'white' }}>{companyDescription}</Text>
|
48
|
+
</View>
|
49
|
+
<View style={{ flexGrow: 0.1, flexDirection: 'column' }}>
|
50
|
+
<Button style={{ alignSelf: 'center' }} accessoryLeft={logoutIcon} onPress={() => { onPressLogout() }} />
|
51
|
+
</View>
|
52
|
+
</View>
|
53
|
+
</Box>
|
54
|
+
);
|
36
55
|
}
|
37
56
|
|
38
57
|
// Camera
|