File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,27 +14,27 @@ type CustomStyleProp = StyleProp<ViewStyle> | Array<StyleProp<ViewStyle>>;
1414const PHOTO = "photo" ;
1515const LIBRARY = "library" ;
1616
17- const Hello = "hello" ;
18-
1917interface IImagePickerModalProps extends IPickerModalProps {
2018 style ?: CustomStyleProp ;
2119 isVisible : boolean ;
2220 data : string [ ] ;
21+ includeBase64 ?: boolean ;
2322 onPress : ( item : any ) => void ;
2423}
2524
2625const ImagePickerModal : React . FC < IImagePickerModalProps > = ( {
2726 isVisible,
2827 data,
2928 onPress,
29+ includeBase64 = false ,
3030 ...rest
3131} ) => {
3232 const handleSelection = async ( selectedItem : string ) => {
3333 if ( selectedItem === data [ 0 ] ) {
3434 const options = {
3535 saveToPhotos : true ,
3636 mediaType : PHOTO as MediaType ,
37- includeBase64 : false ,
37+ includeBase64 : includeBase64 ,
3838 includeExtra : true ,
3939 } ;
4040 const result = await launchCamera ( options ) ;
@@ -43,7 +43,7 @@ const ImagePickerModal: React.FC<IImagePickerModalProps> = ({
4343 const options = {
4444 selectionLimit : 0 ,
4545 mediaType : LIBRARY as MediaType ,
46- includeBase64 : false ,
46+ includeBase64 : includeBase64 ,
4747 includeExtra : true ,
4848 } ;
4949 const result = await launchImageLibrary ( options ) ;
You can’t perform that action at this time.
0 commit comments