mg-library 1.0.576 → 1.0.578
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 +17 -41
- package/package.json +1 -1
package/blocks.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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 {
|
|
4
|
+
import { Popover, Card, 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';
|
|
@@ -536,27 +536,6 @@ export function MGCameraPreview(props) {
|
|
|
536
536
|
)
|
|
537
537
|
}
|
|
538
538
|
|
|
539
|
-
/* export function MGButton(props) {
|
|
540
|
-
const icon = () => (
|
|
541
|
-
<MaterialCommunityIcons
|
|
542
|
-
name={props.icon}
|
|
543
|
-
size={30}
|
|
544
|
-
style={{ color: 'white' }} />
|
|
545
|
-
);
|
|
546
|
-
return (
|
|
547
|
-
<>
|
|
548
|
-
<Button
|
|
549
|
-
onPress={props.callback}
|
|
550
|
-
status='primary'
|
|
551
|
-
accessoryLeft={icon}>
|
|
552
|
-
{!mgFunctionsLib.isEmpty(props.title) &&
|
|
553
|
-
props.title
|
|
554
|
-
}
|
|
555
|
-
</Button>
|
|
556
|
-
</>
|
|
557
|
-
)
|
|
558
|
-
} */
|
|
559
|
-
|
|
560
539
|
export function MGButton(props) {
|
|
561
540
|
return (
|
|
562
541
|
<>
|
|
@@ -565,7 +544,7 @@ export function MGButton(props) {
|
|
|
565
544
|
<NBIcon as={MaterialCommunityIcons} name={props.icon} size='lg' color='white' />
|
|
566
545
|
}
|
|
567
546
|
onPress={props.callback}>
|
|
568
|
-
{!mgFunctionsLib.isEmpty(props.title) &&
|
|
547
|
+
{!mgFunctionsLib.isEmpty(props.title) &&
|
|
569
548
|
<MGText category="p1" color="white">
|
|
570
549
|
{props.title}
|
|
571
550
|
</MGText>
|
|
@@ -577,29 +556,26 @@ export function MGButton(props) {
|
|
|
577
556
|
|
|
578
557
|
export function MGPopover(props) {
|
|
579
558
|
const [visible, setVisible] = useState(false);
|
|
580
|
-
const icon = () => (
|
|
581
|
-
<MaterialCommunityIcons
|
|
582
|
-
name={props.icon}
|
|
583
|
-
size={30}
|
|
584
|
-
style={{ color: 'white' }} />
|
|
585
|
-
);
|
|
586
559
|
const button = () => (
|
|
587
|
-
<
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
{
|
|
592
|
-
|
|
560
|
+
<NBButton py={4} colorScheme='primary'
|
|
561
|
+
leftIcon={
|
|
562
|
+
<NBIcon as={MaterialCommunityIcons} name={props.icon} size='lg' color='white' />
|
|
563
|
+
}
|
|
564
|
+
onPress={() => setVisible(true)}>
|
|
565
|
+
<MGText category="p1" color="white">
|
|
566
|
+
{props.title}
|
|
567
|
+
</MGText>
|
|
568
|
+
</NBButton>
|
|
593
569
|
);
|
|
594
570
|
let cardFooter = (
|
|
595
571
|
<>
|
|
596
572
|
<View style={{ flexGrow: 1, flexDirection: 'row', justifyContent: 'space-around', marginTop: 20, marginBottom: 20 }}>
|
|
597
|
-
<
|
|
598
|
-
<MGText>{mgFunctionsLib.i18nString('yes', props.language)}</MGText>
|
|
599
|
-
</
|
|
600
|
-
<
|
|
601
|
-
<MGText>{mgFunctionsLib.i18nString('no', props.language)}</MGText>
|
|
602
|
-
</
|
|
573
|
+
<NBButton py={4} colorScheme='primary' style={{ flexGrow: 0.3 }} onPress={() => { setVisible(false); props.callback() }}>
|
|
574
|
+
<MGText color="white">{mgFunctionsLib.i18nString('yes', props.language)}</MGText>
|
|
575
|
+
</NBButton>
|
|
576
|
+
<NBButton py={4} colorScheme='primary' style={{ flexGrow: 0.3 }} onPress={() => { setVisible(false) }}>
|
|
577
|
+
<MGText color="white">{mgFunctionsLib.i18nString('no', props.language)}</MGText>
|
|
578
|
+
</NBButton>
|
|
603
579
|
</View>
|
|
604
580
|
</>
|
|
605
581
|
);
|