Skip to content

Commit

Permalink
Fix eslint Example/components/TabIcon.js
Browse files Browse the repository at this point in the history
  • Loading branch information
charpeni committed May 6, 2016
1 parent fd48eba commit 3f374b9
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 3f374b9

Please sign in to comment.