Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor PropTypes and move from View.propTypes to ViewPropTypes #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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