Skip to content

Commit

Permalink
Prettier formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
aarongrider committed Oct 23, 2020
1 parent cd847a3 commit d29aca2
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 15 deletions.
13 changes: 13 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
tabs: false,
tabWidth: 2,
bracketSpacing: true,
singleQuote: true,
trailingComma: 'all',
printWidth: 120,
semi: true,
jsxBracketSameLine: false,
jsxSingleQuote: true,
arrowParens: 'always',
};

30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
## Installation (RN > 0.60)

```bash
npm install react-native-camera-kit --save
yarn add react-native-camera-kit
```

```bash
Expand All @@ -51,25 +51,25 @@ cd ios && pod install && cd ..
### CameraKitCamera - Camera component

```js
import { CameraKitCamera } from "react-native-camera-kit";
import { CameraKitCamera } from 'react-native-camera-kit';
```

```jsx
<CameraKitCamera
ref={(cam) => (this.camera = cam)}
style={{
flex: 1,
backgroundColor: "white",
backgroundColor: 'white',
}}
cameraOptions={{
flashMode: "auto", // on/off/auto(default)
focusMode: "on", // off/on(default)
zoomMode: "on", // off/on(default)
ratioOverlay: "1:1", // optional
ratioOverlayColor: "#00000077", // optional
flashMode: 'auto', // on/off/auto(default)
focusMode: 'on', // off/on(default)
zoomMode: 'on', // off/on(default)
ratioOverlay: '1:1', // optional
ratioOverlayColor: '#00000077', // optional
}}
onReadCode={(
event // optional
event, // optional
) => console.log(event.nativeEvent.codeStringValue)}
resetFocusTimeout={0} // optional
resetFocusWhenMotionDetected={true} // optional
Expand Down Expand Up @@ -235,20 +235,20 @@ Sets `remoteDownloadIndicatorType` prop (and `remoteDownloadIndicatorColor` in o
## QR Code

```js
import { CameraKitCameraScreen } from "react-native-camera-kit";
import { CameraKitCameraScreen } from 'react-native-camera-kit';

<CameraKitCameraScreen
actions={{ rightButtonText: "Done", leftButtonText: "Cancel" }}
actions={{ rightButtonText: 'Done', leftButtonText: 'Cancel' }}
onBottomButtonPressed={(event) => this.onBottomButtonPressed(event)}
scanBarcode={true}
laserColor={"blue"}
frameColor={"yellow"}
onReadCode={(event) => Alert.alert("Qr code found")} //optional
laserColor={'blue'}
frameColor={'yellow'}
onReadCode={(event) => Alert.alert('Qr code found')} //optional
hideControls={false} //(default false) optional, hide buttons and additional controls on top and bottom of screen
showFrame={true} //(default false) optional, show frame with transparent layer (qr code or barcode will be read on this area ONLY), start animation for scanner,that stoped when find any code. Frame always at center of the screen
offsetForScannerFrame={10} //(default 30) optional, offset from left and right side of the screen
heightForScannerFrame={300} //(default 200) optional, change height of the scanner frame
colorForScannerFrame={"red"} //(default white) optional, change colot of the scanner frame
colorForScannerFrame={'red'} //(default white) optional, change colot of the scanner frame
/>;
```

Expand Down

0 comments on commit d29aca2

Please sign in to comment.