mirror of
https://github.com/status-im/react-native-camera.git
synced 2025-02-24 09:48:17 +00:00
fix(warnings): remove inline styles
This commit is contained in:
parent
00f4f4c137
commit
716c4e389d
@ -135,31 +135,12 @@ export default class Camera extends Component {
|
|||||||
permissionDialogTitle: '',
|
permissionDialogTitle: '',
|
||||||
permissionDialogMessage: '',
|
permissionDialogMessage: '',
|
||||||
notAuthorizedView: (
|
notAuthorizedView: (
|
||||||
<View
|
<View style={styles.authorizationContainer}>
|
||||||
style={{
|
<Text style={styles.notAuthorizedText}>Camera not authorized</Text>
|
||||||
flex: 1,
|
|
||||||
alignItems: 'center',
|
|
||||||
justifyContent: 'center',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Text
|
|
||||||
style={{
|
|
||||||
textAlign: 'center',
|
|
||||||
fontSize: 16,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Camera not authorized
|
|
||||||
</Text>
|
|
||||||
</View>
|
</View>
|
||||||
),
|
),
|
||||||
pendingAuthorizationView: (
|
pendingAuthorizationView: (
|
||||||
<View
|
<View style={styles.authorizationContainer}>
|
||||||
style={{
|
|
||||||
flex: 1,
|
|
||||||
alignItems: 'center',
|
|
||||||
justifyContent: 'center',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<ActivityIndicator size="small" />
|
<ActivityIndicator size="small" />
|
||||||
</View>
|
</View>
|
||||||
),
|
),
|
||||||
@ -403,4 +384,13 @@ const RCTCamera = requireNativeComponent('RCTCamera', Camera, {
|
|||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
base: {},
|
base: {},
|
||||||
|
authorizationContainer: {
|
||||||
|
flex: 1,
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
},
|
||||||
|
notAuthorizedText: {
|
||||||
|
textAlign: 'center',
|
||||||
|
fontSize: 16,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
@ -11,6 +11,7 @@ import {
|
|||||||
View,
|
View,
|
||||||
ActivityIndicator,
|
ActivityIndicator,
|
||||||
Text,
|
Text,
|
||||||
|
StyleSheet,
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
|
|
||||||
import type { FaceFeature } from './FaceDetector';
|
import type { FaceFeature } from './FaceDetector';
|
||||||
@ -189,31 +190,12 @@ export default class Camera extends React.Component<PropsType, StateType> {
|
|||||||
permissionDialogTitle: '',
|
permissionDialogTitle: '',
|
||||||
permissionDialogMessage: '',
|
permissionDialogMessage: '',
|
||||||
notAuthorizedView: (
|
notAuthorizedView: (
|
||||||
<View
|
<View style={styles.authorizationContainer}>
|
||||||
style={{
|
<Text style={styles.notAuthorizedText}>Camera not authorized</Text>
|
||||||
flex: 1,
|
|
||||||
alignItems: 'center',
|
|
||||||
justifyContent: 'center',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Text
|
|
||||||
style={{
|
|
||||||
textAlign: 'center',
|
|
||||||
fontSize: 16,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Camera not authorized
|
|
||||||
</Text>
|
|
||||||
</View>
|
</View>
|
||||||
),
|
),
|
||||||
pendingAuthorizationView: (
|
pendingAuthorizationView: (
|
||||||
<View
|
<View style={styles.authorizationContainer}>
|
||||||
style={{
|
|
||||||
flex: 1,
|
|
||||||
alignItems: 'center',
|
|
||||||
justifyContent: 'center',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<ActivityIndicator size="small" />
|
<ActivityIndicator size="small" />
|
||||||
</View>
|
</View>
|
||||||
),
|
),
|
||||||
@ -405,3 +387,15 @@ const RNCamera = requireNativeComponent('RNCamera', Camera, {
|
|||||||
testID: true,
|
testID: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const styles = StyleSheet.create({
|
||||||
|
authorizationContainer: {
|
||||||
|
flex: 1,
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
},
|
||||||
|
notAuthorizedText: {
|
||||||
|
textAlign: 'center',
|
||||||
|
fontSize: 16,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
6388
yarn-error.log
Normal file
6388
yarn-error.log
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user