Skip to content

Commit

Permalink
Merge pull request #1 from kohkimakimoto/fix-propTypes
Browse files Browse the repository at this point in the history
Fix prop types
  • Loading branch information
kohkimakimoto committed Jun 15, 2017
2 parents 8673c62 + e024588 commit f93f030
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
9 changes: 5 additions & 4 deletions example/src/components/detail.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import React, {
} from "react";
import {
View,
Text
Text,
ViewPropType
} from "react-native";

const Detail = (props) => {
Expand All @@ -13,7 +14,7 @@ const Detail = (props) => {
{props.children}
</View>
);

return (
<View style={props.style}>
<Text> No Item selected </Text>
Expand All @@ -22,8 +23,8 @@ const Detail = (props) => {
};

Detail.propTypes = {
...View.propTypes,
...ViewPropType,
children: PropTypes.node.isRequired
};

export default Detail;
export default Detail;
7 changes: 4 additions & 3 deletions lib/components/debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ import React, {
} from "react";
import {
View,
Text
Text,
ViewPropType
} from "react-native";
import { Device } from "../models";

class Debug extends Component {
static displayName = "MediaQueryDebug";
static propTypes = {
...View.propTypes
...ViewPropType
};

constructor(props) {
Expand All @@ -31,4 +32,4 @@ class Debug extends Component {
}
}

export default Debug;
export default Debug;

0 comments on commit f93f030

Please sign in to comment.