1.0.4 • Published 3 years ago

react-native-cryptos-picker v1.0.4

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

react-native-cryptos-picker

Various cryptos picker for iOS and Android

Demo

Getting started

$ npm install react-native-cryptos-picker --save OR $ yarn add react-native-cryptos-picker

Example

import CryptosPicker from "react-native-cryptos-picker";

let cryptosPickerRef = undefined;

// use cryptosPickerRef
cryptosPickerRef.open();
cryptosPickerRef.close();

<CryptosPicker
    cryptosPickerRef={(ref) => {
      cryptosPickerRef = ref;
    }}
    enable={true}
    darkMode={false}
    cryptoSymbol={"USDT"}
    showFlag={true}
    showCryptoName={true}
    showCryptoSymbol={true}
    onSelectCryptos={(data) => {
      console.log("DATA", data);
    }}
    onOpen={() => {
      console.log("Open");
    }}
    onClose={() => {
      console.log("Close");
    }}
    containerStyle={{
      container: {},
      flagWidth: 25,
      cryptoSymbolStyle: {},
      cryptoNameStyle: {}
    }}
    modalStyle={{
      container: {},
      searchStyle: {},
      tileStyle: {},
      itemStyle: {
        itemContainer: {},
        flagWidth: 25,
        cryptoSymbolStyle: {},
        cryptoNameStyle: {}
      },
    }}
    title={"Cryptos"}
    searchPlaceholder={"Search"}
    showCloseButton={true}
    showModalTitle={true}
  />
);

Options

PropsDefaultOptions/Info
enable (Boolean)trueShow component that choose the cryptos.
cryptosPickerRef (Function)nullGet the open() and close() modal methods.
darkMode (Boolean)trueDark mode for cryptos modal.
countryCode (String)USCountry code displayed is selected at start.
onSelectCryptos (Function)nullCalled when the user chooses a crypto and returns information for the selected crypto.
onOpen (Function)nullCalled when the open modal.
onClose (Function)nullCalled when the close modal.
showFlag (Boolean)trueShow the icon of the crypto.
showCryptoName (Boolean)trueShow the name of the crypto.
showCryptoSymbol (Boolean)trueShow the symbol of the crypto.
title (String)"Country"The title of the modal select cryptos.
showCloseButton (Boolean)trueShow the close button of the modal select cryptos.
showModalTitle (Boolean)trueShow the title of the modal select cryptos.
containerStyle (Object)nullStyle for component that choose the cryptos. Note: See more details below.
modalStyle (Object)nullStyle for modal select cryptos. Note: See more details below.
renderChildren (Component)nullThe child component replaces the component element of the library

containerStyle

PropsDefaultOptions/Info
container (Object)styleStyle for component container.
flagWidth (number)25width for the icon crypto.
cryptoSymbolStyle (Object)styleStyle for cryptos symbol.
cryptoNameStyle (Object)styleStyle for cryptos name.

modalStyle

PropsDefaultOptions/Info
container (Object)styleStyle for modal container
searchStyle (Object)styleStyle for modal search input
tileStyle (Object)styleStyle for modal title
itemStyle (Object)styleStyle for item select cryptos Note: See more details below.

itemStyle

PropsDefaultOptions/Info
itemContainer (Object)styleStyle for item crypto container
flagWidth (number)25width for the icon crypto.
cryptoSymbolStyle (Object)styleStyle for crypto symbol.
cryptoNameStyle (Object)styleStyle for crypto name.

Thank you for your interest!