1.0.4 • Published 3 years ago

gallery-rn v1.0.4

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

:wrench: Installation

Install cameraroll

yarn add @react-native-community/cameraroll@4.0.0

or if you prefer

npm install @react-native-community/cameraroll@4.0.0 --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

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago