Skip to content
This repository has been archived by the owner on Jun 16, 2023. It is now read-only.

Commit

Permalink
fix(styles): place style sheet above everything,prevent undefined styles
Browse files Browse the repository at this point in the history
  • Loading branch information
jgfidelis committed Apr 15, 2018
1 parent f74e694 commit 0150189
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
26 changes: 13 additions & 13 deletions src/Camera.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,19 @@ import {

import { requestPermissions } from './handlePermissions';

const styles = StyleSheet.create({
base: {},
authorizationContainer: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
},
notAuthorizedText: {
textAlign: 'center',
fontSize: 16,
},
});

const CameraManager = NativeModules.CameraManager || NativeModules.CameraModule;

function convertNativeProps(props) {
Expand Down Expand Up @@ -381,16 +394,3 @@ const RCTCamera = requireNativeComponent('RCTCamera', Camera, {
onLayout: true,
},
});

const styles = StyleSheet.create({
base: {},
authorizationContainer: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
},
notAuthorizedText: {
textAlign: 'center',
fontSize: 16,
},
});
24 changes: 12 additions & 12 deletions src/RNCamera.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ import type { FaceFeature } from './FaceDetector';

import { requestPermissions } from './handlePermissions';

const styles = StyleSheet.create({
authorizationContainer: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
},
notAuthorizedText: {
textAlign: 'center',
fontSize: 16,
},
});

type PictureOptions = {
quality?: number,
base64?: boolean,
Expand Down Expand Up @@ -387,15 +399,3 @@ const RNCamera = requireNativeComponent('RNCamera', Camera, {
testID: true,
},
});

const styles = StyleSheet.create({
authorizationContainer: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
},
notAuthorizedText: {
textAlign: 'center',
fontSize: 16,
},
});

0 comments on commit 0150189

Please sign in to comment.