1.0.2 • Published 3 years ago

react-native-instagram-like-picker v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

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

Parametertyperequireddefaultdescription
onClosefunctionYesthis will call onclick of cross icon
onCroppedfunction js (selectUrl)=>{}Nothis function return the cropped image url
onSelectImagefunction js (selectUrl)=>{}Nocall on changing image selection
headerTitlestringNoNew PostHeader Title

Contributing

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

License

MIT