Default Camera to flex of 1
This commit is contained in:
parent
66f517599c
commit
75edaf08c6
|
@ -121,7 +121,6 @@ import { Camera, CameraType } from 'react-native-camera-kit';
|
|||
```tsx
|
||||
<Camera
|
||||
ref={(ref) => (this.camera = ref)}
|
||||
style={{ flex: 1 }}
|
||||
cameraType={CameraType.Back} // front/back(default)
|
||||
/>
|
||||
```
|
||||
|
|
|
@ -10,7 +10,6 @@ export default class CameraExample extends Component {
|
|||
<Camera
|
||||
ref={this.camera}
|
||||
cameraType={CameraType.Back} // optional
|
||||
style={{ flex: 1 }}
|
||||
flashMode="auto" // on/off/auto(default)
|
||||
focusMode="on" // off/on(default)
|
||||
zoomMode="on" // off/on(default)
|
||||
|
|
|
@ -25,7 +25,7 @@ function Camera(props, ref) {
|
|||
_.update(transformedProps, 'laserColor', (c) => processColor(c));
|
||||
_.update(transformedProps, 'surfaceColor', (c) => processColor(c));
|
||||
|
||||
return <NativeCamera flashMode={props.flashMode} ref={nativeRef} {...transformedProps} />;
|
||||
return <NativeCamera style={{flex: 1}} flashMode={props.flashMode} ref={nativeRef} {...transformedProps} />;
|
||||
}
|
||||
|
||||
const { PORTRAIT, PORTRAIT_UPSIDE_DOWN, LANDSCAPE_LEFT, LANDSCAPE_RIGHT } = RNCameraKitModule.getConstants();
|
||||
|
|
|
@ -23,7 +23,7 @@ function Camera(props, ref) {
|
|||
const transformedProps = _.cloneDeep(props);
|
||||
_.update(transformedProps, 'cameraOptions.ratioOverlayColor', (c) => processColor(c));
|
||||
|
||||
return <NativeCamera ref={nativeRef} {...transformedProps} />;
|
||||
return <NativeCamera style={{flex: 1}} ref={nativeRef} {...transformedProps} />;
|
||||
}
|
||||
|
||||
Camera.defaultProps = {
|
||||
|
|
Loading…
Reference in New Issue