Socket
Socket
Sign inDemoInstall

@volkenomakers/image-picker

Package Overview
Dependencies
637
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @volkenomakers/image-picker

a react native module developped by volkeno


Version published
Maintainers
1
Created

Readme

Source

image-picker

Single select

Add it to your project

  • Using NPM npm install @volkenomakers/image-picker

  • Using Yarn yarn add @volkenomakers/image-picker

add expo-image-picker

expo install expo-image-picker

Usage

import React from "react";
import { View } from "react-native";
import { Button } from "react-native-elements";
import {
  useImagePickerModal,
  launchCameraAsync,
  launchImageLibraryAsync,
} from "@volkenomakers/image-picker";

const ImagePickerApp = () => {
  const [showModal, renderModal] = useImagePickerModal(
    (result) => {
      if (result) {
        console.log(result);
      }
    },
    {
      joinImageText: "Join an image",
      useCameraText: "Open camera",
    }
  );
  return (
    <View style={{ flex: 1, alignItems: "center", justifyContent: "center" }}>
      {renderModal()}
      <Button title="Show Picker modal" onPress={() => showModal(true)} />
      <Button
        title="Open camera"
        onPress={() => launchCameraAsync()}
        containerStyle={{ marginVertical: 20 }}
      />
      <Button title="Pick image" onPress={() => launchImageLibraryAsync()} />
    </View>
  );
};

export default ImagePickerApp;

Keywords

FAQs

Last updated on 17 Jan 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc