1.0.4 • Published 10 months ago

react-native-drop-down-mith v1.0.4

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

react-native-dropdown-mith

react-native-dropdown-mith is fully customize library , that is used both Platform Android and Ios.

Getting started

 npm i react-native-drop-down-mith

 yarn add react-native-drop-down-mith

Demo

Properties

containerStyleStyleMain View
dropDownStyleStyleListview Styles
data[]{ id: number; value: string }
titleString""
titleStyleTextStyleMain title style
placeHolderString""
itemTextStyleTextStyle""
selectedTextStyleTextStyle""
selectedTextString""

Code

import React from 'react';
import {View, Text, SafeAreaView} from 'react-native';
import DropDown from 'react-native-drop-down-mith';

const Home = () => {
  return (
    <SafeAreaView style={{flex: 1}}>
      <View style={{width: '100%', height: '100%', paddingHorizontal: 10}}>
        <Text style={{alignSelf: 'center'}}>React Native DropDown</Text>
        <View
          style={{width: 300, height: 50, marginTop: 40, alignSelf: 'center'}}>
          <DropDown
            titleStyle={{marginBottom: 5, marginLeft: 3, fontWeight: 'bold'}}
            title="Title"
            onClick={item => console.log('------->', item)}
            placeHolder="Please select Language"
            data={[
              {id: 0, value: 'Java'},
              {id: 0, value: 'Android'},
              {id: 0, value: 'Ios'},
              {id: 0, value: 'Java Script'},
            ]}
          />
        </View>
      </View>
    </SafeAreaView>
  );
};