0.1.2 • Published 10 months ago

@chainplatform/country v0.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

Swiper

@chainplatform/country support react-native and react-native-web

Install

npm install @chainplatform/country --save

or

yarn add @chainplatform/country

Usage

import React from 'react';
import {CountryPicker} from '@chainplatform/country';

class App extends React.Component {

    constructor(props) {
        super(props);

        this.state = {
          show: false
        };
    }

  render() {
    return (
      <View style={{flex:1}}>
        <CountryPicker
            show={this.state.show}
            inputPlaceholder={"search_placeholder"}
            searchMessage={"search_no_result"}
            pickerButtonOnPress={(item) => {
                console.log("item ", item);
                this.setState({show: false});
            }}
            style={{
                // Styles for whole modal [View]
                modal: {
                  
                },
                // Styles for modal backdrop [View]
                backdrop: {},
                // Styles for bottom input line [View]
                line: {
                    with: 0,
                    height: 0
                },
                // Styles for list of countries [FlatList]
                itemsList: {
                    
                },
                // Styles for input [TextInput]
                textInput: {
                    
                },
                // Styles for country button [Pressable]
                countryButtonStyles: {
                    
                },
                // Styles for search message [Text]
                searchMessageText: {
                    
                },
                // Styles for search message container [View]
                countryMessageContainer: {},
                // Flag styles [Text]
                flag: {},
                // Dial code styles [Text]
                dialCode: {
                    
                },
                // Country name styles [Text]
                countryName: {
                    
                }
            }}
        />
      </View>
    );
  }
}
0.1.2

10 months ago

0.1.1

10 months ago

0.1.0

11 months ago