gallery-rn
v1.0.4
Published
Gallery for selecting media
Downloads
3
Readme
:wrench: Installation
Install cameraroll
yarn add @react-native-community/[email protected]
or if you prefer
npm install @react-native-community/[email protected] --save
Then link to the project
react-native link @react-native-community/cameraroll
Install Vector Icons
yarn add react-native-vector-icons
or if you prefer
npm install react-native-vector-icons --save
Then link to the project
react-native link react-native-vector-icons
In case of any problem when executing the project, access the website - @react-native-community/cameraroll
:sparkles: Functionalities
:heavy_check_mark: Gallery for selecting media;
:star: Example
Example
import React, { useState, useCallback } from 'react';
import { View } from 'react-native';
import Gallery from 'gallery-rn';
interface IITem {
id: string;
name: string;
uri: string;
}
const App = () => {
const [images, setImages] = useState<IITem[]>([]);
const handleListImages = useCallback((items: IITem[]) => {
setImages([...items]);
}, []);
return (
<View style={{flex: 1}}>
<Gallery
onPress={e => handleListImages(e)}
limit={20}
listSelected={images}
/>
</View>
)
}
:rocket: Technology
The following tools were used in the construction of the project:
:memo: Licença
This project is under MIT license. See the archive LICENSE for more details.
Done with :heart: per Mateus Conceição
Back to the top