-
Notifications
You must be signed in to change notification settings - Fork 90
Open
Description
I got an issue here, Hope you can help me in this situation here is my code.
const routes = [
{
value:"Daily Time Record",
datavalue:"Home",
buttoncolors:"this.state.buttoncolor"
},
{
value:"Personal Info",
datavalue: "EmployeePersonalInfo",
buttoncolors:"this.state.buttoncolor1"
},
{
value:"Employment Info",
datavalue: "EmploymentInfo",
buttoncolors:"this.state.buttoncolor2"
}
];
export default class SideBar extends React.Component {
constructor(props){
super(props);
this.state={
buttoncolor:'white',
buttoncolor1:'gray',
buttoncolor1:'blue'
};
}
render() {
return (
<View style={{
width:300,
height:540,
backgroundColor:'#212223'
}}>
<Header style={{
height:100,
backgroundColor:'#212223',
justifyContent:'flex-start',
alignItems:'center',
borderBottomWidth:1,
borderBottomColor:'black',
}}>
<Title>Juan De la cruz</Title>
</Header>
<View style={{width:300,height:165}}>
<List style={{marginLeft:-17}}
dataArray={routes}
renderRow={data => {
return (
<ListItem style={{
backgroundColor:'#212223',
borderColor:'black',
borderBottomWidth:1
}}
button style={{backgroundColor:data.buttoncolors}}
onPress={() => this.props.navigation.navigate(data.datavalue)}
>
<Body>
<Text style={{color:'white'}}>{data.value}</Text>
</Body>
<Right>
<Icon name="ios-arrow-forward" />
</Right>
</ListItem>
);
}}
<List />
</View>
</View>
);
}
}
Metadata
Metadata
Assignees
Labels
No labels