Skip to content

Commit

Permalink
Refactor PropTypes and move from View.propTypes to ViewPropTypes due …
Browse files Browse the repository at this point in the history
…to deprecated APIs breaking from RN 0.49 on; Update README to state new minimum RN version for lib; this fixes react-native-component#5
  • Loading branch information
coreform committed Nov 28, 2017
1 parent 6388584 commit 47839fa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions Badge.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@
* Copyright (c) 2016 react-native-component <[email protected]>
*/

import React, {
Component,
PropTypes,
} from 'react'
import React, { Component } from 'react';
import { PropTypes } from 'prop-types';
import {
View,
Text,
StyleSheet,
ViewPropTypes
} from 'react-native'

const styles = StyleSheet.create({
Expand Down Expand Up @@ -45,7 +44,7 @@ export default class Badge extends Component {
static propTypes = {
//borderRadius: PropTypes.number, //number 18, null 5
extraPaddingHorizontal: PropTypes.number,
style: View.propTypes.style,
style: ViewPropTypes.style,
textStyle: Text.propTypes.style,
minHeight: PropTypes.number,
minWidth: PropTypes.number,
Expand Down Expand Up @@ -104,4 +103,4 @@ export default class Badge extends Component {
});
}

}
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
A smart autofit badge for react-native apps, written in JS for cross-platform support.
It works on iOS and Android.

This component is compatible with React Native 0.25 and newer.
This component is compatible with React Native 0.49 and newer.

## Preview

Expand Down

0 comments on commit 47839fa

Please sign in to comment.