Skip to content

Commit 8f5a58c

Browse files
committed
Fixed typo - no semicolon
1 parent 6aa4efa commit 8f5a58c

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,15 @@ An `<AwesomeButton />` component that creates a button depicting different state
2323
#### Simple Example
2424
To use `<AwesomeButton>`, you need to require `react-native-awesome-button` to your module and insert `<AwesomeButton>` tag inside render function with the required properties as it's done below:
2525
```javascript
26-
const React = require('react-native')
27-
const AwesomeButton = require('react-native-awesome-button')
26+
import React, { Component } from 'react';
2827

29-
30-
const {
28+
import {
3129
AppRegistry,
32-
Component,
3330
View,
3431
StyleSheet
35-
} = React
32+
} from 'react-native';
33+
34+
import AwesomeButton from 'react-native-awesome-button';
3635

3736

3837
const styles = StyleSheet.create({
@@ -58,7 +57,8 @@ class Simple extends Component {
5857
<AwesomeButton states={{
5958
default: {
6059
text: 'Press me',
61-
onPress: this.handleButtonPress
60+
onPress: this.handleButtonPress,
61+
backgroundColor: '#1155DD'
6262
}
6363
}} />
6464
</View>

src/AwesomeButton.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { Component } from 'react';
1+
import React, { Component, PropTypes } from 'react';
22

33
import {
44
Animated,
@@ -23,6 +23,9 @@ class InnerButtonView extends Component {
2323

2424

2525
export default class AwesomeButton extends Component {
26+
static propTypes = {
27+
states: PropTypes.object.isRequired
28+
}
2629
constructor(props) {
2730
super(props);
2831
const currentStateObject = this.props.states[this.props.buttonState] || this.getDefaultStateObject()
@@ -93,9 +96,6 @@ export default class AwesomeButton extends Component {
9396
}
9497

9598

96-
// TODO: Define possible propTypes and requirements
97-
98-
9999
AwesomeButton.defaultProps = {
100100
backgroundStyle: {
101101
flex: 1,

src/ProgressBar.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ export default class ProgressBar extends Component {
1818
);
1919
}
2020
}
21-
});
21+
}

0 commit comments

Comments
 (0)