react-native-dropdown-menu-sctest

1.0.0 • Public • Published

react-native-dropdown-menu

A <DropdownMenu> component for react-native ( iOS/android ). Easy to use.

Install

npm i react-native-dropdown-menu-sc --save

or

yarn add react-native-dropdown-menu-sc

Usage

import DropdownMenu from 'react-native-dropdown-menu';

export default class Demo extends Component {

  constructor(props) {
    super(props);
    this.state = {
      text: ''
    };
  }
  
  render() {
    var data = [["C", "Java", "JavaScript", "PHP"], ["Python", "Ruby"], ["Swift", "Objective-C"]];
    return (
      <View style={{flex: 1}}>
        <View style={{height: 64}} />
        <DropdownMenu
          style={{flex: 1}}
          bgColor={'white'}
          tintColor={'#666666'}
          activityTintColor={'green'}
          // arrowImg={}      
          // checkImage={}   
          // optionTextStyle={{color: '#333333'}}
          // titleStyle={{color: '#333333'}} 
          // maxHeight={300} 
          handler={(selection, row) => this.setState({text: data[selection][row]})}
          data={data}
        >

          <View style={{flex: 1}}>
            <Text>
              {this.state.text} is the best language in the world
            </Text>
          </View>

        </DropdownMenu>
      </View>
    );
  }
  
}

Package Sidebar

Install

npm i react-native-dropdown-menu-sctest

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

40.8 kB

Total Files

10

Last publish

Collaborators

  • shencaikj