# react-native-icon-button
A simple button component allowing you to create customisable and visually appealing buttons, utilising images, text or a combination of both depending on the desired result.

![Demo](http://i.imgur.com/a2Ecrea.gif)

## Installation

To install simply enter the following...

```sh
$ npm install react-native-icon-button
```

Then require it in your project wherever you need it...

```javascript
var Button = require('react-native-icon-button');
```

## Properties

| Prop | Type | Opt/Required | Default | Note |
|---|---|---|---|---|
|__`icon`__|_Image_|Optional|`N/A`|The image resource (must be required directly).
|__`iconSize`__|_Number_|Optional|`N/A`|Scales the icon / image to the specified size.
|__`text`__|_String_|Optional|`N/A`|The text that will be displayed on the button.
|__`onPress`__|_Function_|Required|`N/A`|A function that will be called when the accordion is pressed.
|__`underlayColor`__|_String_|Optional|`transparent`|The underlay color of the [TouchableHighlight](https://facebook.github.io/react-native/docs/touchablehighlight.html).
|__`style`__|_Object_|Optional|`(See Example)`|Custom button styling, colors, border radius etc...

## Example

```javascript 
  
var Button = require('react-native-icon-button');

var testing = React.createClass({

  action: function() {
    //Do stuff! :)
  },
  
  render: function() {
    return (
      <View style={styles.container}>
        <Button 
          style={styles.button}
          onPress={this.action}
          icon={require('image!my_icon')}
          iconSize={20}
          color={"white"}
          text={"Press me!"}
        />
      </View>
    );
  }
  
});

var styles = StyleSheet.create({

  button: {
  	padding: 10,
  	borderRadius: 5,
  	backgroundColor: '#272822',
  	color: 'white'
  }
  
});

```
