Skip to content

Commit

Permalink
Merge pull request #643 from charpeni/eslint-example-tabicon
Browse files Browse the repository at this point in the history
Fix eslint Example/components/TabIcon.js
  • Loading branch information
aksonov committed May 9, 2016
2 parents fae6df2 + 3f374b9 commit b084bbd
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions Example/components/TabIcon.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
import React from 'react';
import {Text} from "react-native";
export default class extends React.Component {
render(){
return (
<Text style={{color: this.props.selected ? "red" :"black"}}>{this.props.title}</Text>
);
}
}
import { PropTypes, Text } from 'react-native';

const propTypes = {
selected: PropTypes.string,
title: PropTypes.string,
};

const TabIcon = (props) => (
<Text
style={{ color: props.selected ? 'red' : 'black' }}
>
{props.title}
</Text>
);

TabIcon.propTypes = propTypes;

export default TabIcon;

0 comments on commit b084bbd

Please sign in to comment.