Skip to content
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
3 changes: 2 additions & 1 deletion app/components/TodoItem.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import { Text, Icon, ListItem, CheckBox } from 'native-base';

const TodoItem = ({ toggle, remove, item }) => (
Expand Down
27 changes: 18 additions & 9 deletions app/components/todo.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Container, Header, Title, Content, InputGroup, Input, List, Button, Icon } from 'native-base';
import { View, Text, Dimensions } from 'react-native';

Expand All @@ -9,11 +10,11 @@ const { width } = Dimensions.get('window');
export default class Todo extends Component {

static propTypes = {
removeTodo: React.PropTypes.func,
setVisibilityFilter: React.PropTypes.func,
toggleTodo: React.PropTypes.func,
todos: React.PropTypes.array,
displayType: React.PropTypes.string,
removeTodo: PropTypes.func,
setVisibilityFilter: PropTypes.func,
toggleTodo: PropTypes.func,
todos: PropTypes.array,
displayType: PropTypes.string,
}

constructor(props) {
Expand Down Expand Up @@ -107,19 +108,25 @@ export default class Todo extends Component {
transparent
bordered={this.props.displayType === 'all'}
onPress={() => this.props.setVisibilityFilter('all')}
>All</Button>
>
<Text> All </Text>
</Button>

<Button
transparent
bordered={this.props.displayType === 'completed'}
onPress={() => this.props.setVisibilityFilter('completed')}
>Completed</Button>
>
<Text> Completed </Text>
</Button>

<Button
transparent
bordered={this.props.displayType === 'active'}
onPress={() => this.props.setVisibilityFilter('active')}
>Active</Button>
>
<Text> Active </Text>
</Button>

</View>}
</View>
Expand Down Expand Up @@ -148,7 +155,9 @@ export default class Todo extends Component {
<Button
style={{ flex: 0.1, marginLeft: 15 }}
onPress={() => this.onSubmit()}
> Add </Button>
>
<Text> Add </Text>
</Button>
</View>
</Container>
);
Expand Down
119 changes: 119 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"dependencies": {
"moment": "^2.15.1",
"native-base": "^0.5.15",
"prop-types": "^15.6.0",
"react": "15.3.2",
"react-native": "0.35.0",
"react-redux": "^4.4.5",
Expand Down