Skip to content

A React Native Library that let's you pick the image and crop it, like instagram did.

License

Notifications You must be signed in to change notification settings

amitpanday/react-native-instagram-like-picker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-instagram-like-picker

Pick the image like instagram and manupulate it.

Installation

npm install react-native-instagram-like-picker

Basic Usage

import React from 'react';
import { View } from 'react-native';
import { InstagramLikePicker } from 'react-native-instagram-like-picker';

class UploadFiles extends React.Component {

    constructor(props) {
        super(props);
        this.state = {};
    }

    onSelectImage = (data) => {
        console.log('onSelectImage =>', data);
    }

    onCropped = (data) => {
        console.log('onCropped =>', data);
    }

    onClose = () => {
        console.log('onClose');
    }

    render() {
        return (
            <View style={{ flex: 1, backgroundColor: '#000000' }}>
                <InstagramLikePicker
                    onClose={()=>this.onClose()}
                    onCropped={(croppedUri) => this.onCropped(croppedUri)}
                    onSelectImage={(result) => this.onSelectImage(result)}
                    headerTitle="Last Post"
                />
            </View>
        )
    }
}

Props

Parameter type required default description
onClose function Yes this will call onclick of cross icon
onCropped function js (selectUrl)=>{} No this function return the cropped image url
onSelectImage function js (selectUrl)=>{} No call on changing image selection
headerTitle string No New Post Header Title

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

About

A React Native Library that let's you pick the image and crop it, like instagram did.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published