mg-library 1.0.454 → 1.0.456

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.
Files changed (2) hide show
  1. package/blocks.js +28 -2
  2. package/package.json +1 -1
package/blocks.js CHANGED
@@ -404,7 +404,7 @@ export function MGCamera(props) {
404
404
  props.process.goForward(props.nextStep);
405
405
  props.dispatch(props.actions.endProcessing());
406
406
  }
407
- const [facing, setFacing] = useState < CameraType > ('front');
407
+ const [facing, setFacing] = useState('front');
408
408
  const FlipIcon = () => (
409
409
  <MaterialCommunityIcons
410
410
  name='camera-flip-outline'
@@ -418,11 +418,37 @@ export function MGCamera(props) {
418
418
  style={{ color: 'white' }} />
419
419
  );
420
420
  const cardHeader = (
421
- <View>
421
+ <View style={{ marginLeft: 15, marginTop: 10, marginBottom: 10 }}>
422
+ <Text category='h6'>{mgFunctionsLib.i18nString('photo', props.language)}</Text>
423
+ <Text>{mgFunctionsLib.i18nString('takePhoto', props.language)}</Text>
422
424
  </View>
423
425
  );
424
426
  const cardFooter = (
425
427
  <View>
428
+ <View style={{ flexDirection: 'row' }}>
429
+ <View style={{ flex: 1, alignItems: 'center' }}>
430
+ <Button
431
+ style={{ width: 150 }}
432
+ status='primary'
433
+ accessoryLeft={FlipIcon}
434
+ onPress={() => {
435
+ setType(
436
+ type === Camera.Constants.Type.back ? Camera.Constants.Type.front : Camera.Constants.Type.back
437
+ )
438
+ }}>
439
+ <Text>{mgFunctionsLib.i18nString('doInvertCamera', props.language)}</Text>
440
+ </Button>
441
+ </View>
442
+ <View style={{ flex: 1, alignItems: 'center' }}>
443
+ <Button
444
+ style={{ width: 150 }}
445
+ status='primary'
446
+ accessoryLeft={TakeIcon}
447
+ onPress={__takePicture}>
448
+ <Text>{mgFunctionsLib.i18nString('doTakePhoto', props.language)}</Text>
449
+ </Button>
450
+ </View>
451
+ </View>
426
452
  </View>
427
453
  );
428
454
  return (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mg-library",
3
- "version": "1.0.454",
3
+ "version": "1.0.456",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {