Skip to content

reddingit/react-native-helight-button

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-helight-button

A React Native component works like UIButton

Installation

$ npm install react-native-helight-button

Example

import React from 'react-native';
let {
    Component,
    AppRegistry,
    StyleSheet,
    View,
} = React;

import Button from './button';

class AwesomeProject extends Component {
    render() {
        return (
            <View style={styles.container}>
	            <Button 
	                title={'Touch me'} 
	                normalTitleStyle={{color: 'yellow'}}
	                helightTitleStyle={{color: 'red'}}
	                selectTitleStyle={{color: 'black'}} 
	                selected={true}
	                onPress={()=>{console.log('on press')}} />
          	</View>
        );
    }
}

let styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#F5FCFF',
  },
});

AppRegistry.registerComponent('AwesomeProject', () => AwesomeProject);

License

(c) 2015 Redding Yu. MIT License.

About

A React Native component works like UIButton

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published