mg-library 1.0.411 → 1.0.413
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 +14 -4
- package/package.json +1 -1
package/blocks.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { useCallback, useState, useEffect } from 'react';
|
2
2
|
import { useForm, Controller } from 'react-hook-form';
|
3
|
-
import { View, ActivityIndicator, Pressable, Image, FlatList, Keyboard } from 'react-native';
|
3
|
+
import { View, ActivityIndicator, Pressable, Image, FlatList, Keyboard, Dimensions } from 'react-native';
|
4
4
|
import { Text, Divider, 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';
|
@@ -251,10 +251,22 @@ export function MGCurrentAccount(props) {
|
|
251
251
|
)
|
252
252
|
}
|
253
253
|
|
254
|
+
export function getWidthForCamera() {
|
255
|
+
return Dimensions.get('window').width;
|
256
|
+
}
|
257
|
+
|
258
|
+
export function getHeightForCamera() {
|
259
|
+
return Dimensions.get('window').height;
|
260
|
+
}
|
261
|
+
|
254
262
|
export function MGCamera(props) {
|
255
263
|
let camera;
|
256
264
|
let captureWidth = 205;
|
257
265
|
let captureHeight = 275;
|
266
|
+
|
267
|
+
console.log(getWidthForCamera());
|
268
|
+
console.log(getHeightForCamera());
|
269
|
+
|
258
270
|
const __takePicture = async () => {
|
259
271
|
if (!camera)
|
260
272
|
return;
|
@@ -507,9 +519,7 @@ export function MGFlatListHeader(props) {
|
|
507
519
|
{props.sessionHeader}
|
508
520
|
{props.goBack}
|
509
521
|
{props.beforeTitle != undefined &&
|
510
|
-
|
511
|
-
props.beforeTitle
|
512
|
-
</>
|
522
|
+
props.beforeTitle
|
513
523
|
}
|
514
524
|
<View style={{ marginHorizontal: 10, marginBottom: 20, paddingHorizontal: 10, paddingVertical: 10, borderColor: props.theme['color-primary-500'], borderRadius: 10, borderStyle: 'solid', borderWidth: 1 }}>
|
515
525
|
<Text category='h6' style={{ marginLeft: 10 }}>{props.title}</Text>
|