Skip to content

Instantly share code, notes, and snippets.

@roniewill
Created May 10, 2018 16:57
Show Gist options
  • Save roniewill/5fef12ecdc844e632f4a88b9a50dc2e2 to your computer and use it in GitHub Desktop.
Save roniewill/5fef12ecdc844e632f4a88b9a50dc2e2 to your computer and use it in GitHub Desktop.
import React, { Component } from "react";
import { View, Text} from "react-native";
import { Container, Button, Icon, CheckBox} from "native-base";
import styles from "./styles";
const services = [
{
id: 1,
name: "Design",
status: "unchecked"
},
{
id: 2,
name: "Development",
status: "unchecked"
},
{
id: 3,
name: "Web Consultancy",
status: "unchecked"
},
{
id: 4,
name: "Multimedia",
status: "unchecked"
}, {
id: 5,
name: "Digital marketing",
status: "unchecked"
},
{
id: 6,
name: "Support",
status: "unchecked"
},
];
const state = [
{
id: 1,
name: "Em curso",
status: "unchecked"
},
{
id: 2,
name: "Parado",
status: "unchecked"
},
{
id: 3,
name: "Concluido",
status: "unchecked"
},
];
class Filters extends Component {
constructor(props){
super(props);
this.state = {
checked: false
};
}
_handleChangeCheck = () => this.setState({
checked: !this.state.checked
});
render() {
return (
<Container>
<View style={{ flexDirection: "row", marginTop: 10, marginBottom: -40 }}>
<Button transparent style={{width: 100, height: 100}} onPress={() => this._navigateTo("Reports")}>
<Icon name="close" style={ styles.btnIcon }/>
</Button>
<Text style={ styles.topText }>
Cancelar
</Text>
</View>
<View style={{ padding: 20 }}>
<Text style={ styles._text }>Serviços</Text>
<View style={{ flexDirection: "row" }}>
<View style={{ flex: 1 }}>
<CheckBox
onPress={this._handleChangeCheck}
checked={this.state.checked}
color="red"
/>
<Text style={{ marginLeft: 20 }}>Design</Text>
<CheckBox
onPress={this._handleChangeCheck}
checked={this.state.checked}
color="red"
/>
<Text style={{ marginLeft: 20 }}>Multimedia</Text>
<CheckBox
onPress={this._handleChangeCheck}
checked={this.state.checked}
color="red"
/>
<Text style={{ marginLeft: 20 }}>Multimedia</Text>
</View>
<View style={{ flex: 1 }}>
<CheckBox
onPress={this._handleChangeCheck}
checked={this.state.checked}
color="red"
/>
<Text style={{ marginLeft: 20 }}>Design</Text>
<CheckBox
onPress={this._handleChangeCheck}
checked={this.state.checked}
color="red"
/>
<Text style={{ marginLeft: 20 }}>Multimedia</Text>
<CheckBox
onPress={this._handleChangeCheck}
checked={this.state.checked}
color="red"
/>
<Text style={{ marginLeft: 20 }}>Multimedia</Text>
</View>
</View>
</View>
</Container>
);
}
}
export default Filters;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment