import {launchImageLibrary, launchCamera} from 'react-native-image-picker';
const imagePickerOption = {
mediaType: 'photo',
maxWidth: 768,
maxHeight: 768,
includeBase64: Platform.OS === 'android',
};
const CameraButton = () => {
const onPickImage = (res) => {
if (res.didCancel || !res) {
return;
}
console.log(res);
};
const onLaunchCamera = () => {
launchCamera(imagePickerOption, onPickImage);
};
const onLaunchImageLibrary = () => {
launchImageLibrary(imagePickerOption, onPickImage);
};
return (
<View />
)
}