npmhub90 / react-native-modern-qrscanner

A React Native package designed for fast and accurate QR code scanning. Developed with advanced camera processing technology to enhance app interactivity. Features dynamic focus, environment adaptability, and support for various QR formats.
MIT License
2 stars 0 forks source link

Can you give us example for props, except onRead? #1

Open mfebriann opened 5 months ago

mfebriann commented 5 months ago

In the Readme you explain about props

But you just explain about onRead, can you give example one by one each props? And what the default value on each props

Thank you.

loresclement commented 3 months ago

Hello, From what I found in the code we have the followings props :

` static defaultProps = {

onRead: () => {},
renderTopView: () => {},
renderBottomView: () => (
  <View style={{ flex: 1, backgroundColor: "#0000004D" }} />
),
rectHeight: 200,
rectWidth: 200,
flashMode: false, 
finderX: 0,
finderY: 0, 
zoom: 0.2, // Zoom range 0 - 1
translucent: false,
isRepeatScan: false,
cameraType: "back",
notAuthorizedView: () => (
  <View style={styles.authorizationContainer}>
    <Text style={styles.notAuthorizedText}>Camera not authorized</Text>
  </View>
),
vibrate: true,

};`

mfebriann commented 3 months ago

Hello, From what I found in the code we have the followings props :

` static defaultProps = {

onRead: () => {},
renderTopView: () => {},
renderBottomView: () => (
  <View style={{ flex: 1, backgroundColor: "#0000004D" }} />
),
rectHeight: 200,
rectWidth: 200,
flashMode: false, 
finderX: 0,
finderY: 0, 
zoom: 0.2, // Zoom range 0 - 1
translucent: false,
isRepeatScan: false,
cameraType: "back",
notAuthorizedView: () => (
  <View style={styles.authorizationContainer}>
    <Text style={styles.notAuthorizedText}>Camera not authorized</Text>
  </View>
),
vibrate: true,

};`

Noted, thank you sir, I will try it