Fixed build issues, defaultProps (#461)
This commit is contained in:
parent
73b1110f90
commit
ce1e83c202
|
@ -0,0 +1,10 @@
|
|||
example/
|
||||
dist/
|
||||
images/
|
||||
ios/
|
||||
android/
|
||||
assets/
|
||||
.vscode/
|
||||
.github/
|
||||
/.eslintrc.js
|
||||
/metro.config.js
|
|
@ -9,7 +9,7 @@ import {
|
|||
Dimensions,
|
||||
Platform,
|
||||
SafeAreaView,
|
||||
ImageStyle
|
||||
ImageStyle,
|
||||
} from 'react-native';
|
||||
import _ from 'lodash';
|
||||
import Camera from './Camera';
|
||||
|
@ -69,6 +69,7 @@ export default class CameraScreen extends Component<Props, State> {
|
|||
|
||||
static defaultProps = {
|
||||
allowCaptureRetake: false,
|
||||
saveToCameraRoll: true,
|
||||
};
|
||||
|
||||
currentFlashArrayPosition: number;
|
||||
|
@ -197,7 +198,7 @@ export default class CameraScreen extends Component<Props, State> {
|
|||
laserColor={this.props.laserColor}
|
||||
frameColor={this.props.frameColor}
|
||||
onReadCode={this.props.onReadCode}
|
||||
|
||||
|
||||
/>
|
||||
)}
|
||||
</View>
|
||||
|
@ -221,7 +222,11 @@ export default class CameraScreen extends Component<Props, State> {
|
|||
!this.isCaptureRetakeMode() && (
|
||||
<View style={styles.captureButtonContainer}>
|
||||
<TouchableOpacity onPress={() => this.onCaptureImagePressed()}>
|
||||
<Image source={this.props.captureButtonImage} style={this.props.captureButtonImageStyle} resizeMode="contain" />
|
||||
<Image
|
||||
source={this.props.captureButtonImage}
|
||||
style={this.props.captureButtonImageStyle}
|
||||
resizeMode="contain"
|
||||
/>
|
||||
{this.props.showCapturedImageCount && (
|
||||
<View style={styles.textNumberContainer}>
|
||||
<Text>{this.numberOfImagesTaken()}</Text>
|
||||
|
@ -349,11 +354,6 @@ export default class CameraScreen extends Component<Props, State> {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
CameraScreen.defaultProps = {
|
||||
saveToCameraRoll: true
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create(
|
||||
{
|
||||
bottomButtons: {
|
||||
|
|
Loading…
Reference in New Issue