Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. class Item extend React.Component {
  2. state = {
  3. checked: false,
  4. }
  5.  
  6. render() {
  7. return() {
  8. <Block padding={[10, 15, 20, 15]} color='#EFF8FF' margin={[0, 0, 1, 0]} row center middle key={index}>
  9. <Block styles={styles.ContainerAssign} flex={0.3}>
  10. <Switch
  11. style={{ transform: [{ scaleX: .8 }, { scaleY: .8 }] }}
  12. value={this.state.checked} // i would like to check just one of these
  13. testID={index}
  14. onValueChange={(value) => this.containerSelected(value, item, index)}
  15. />
  16. </Block>
  17.  
  18. <Block styles={styles.ContainerInfo} padding={[0, 5, 0, 0]}>
  19. <Text style={styles.ContainerInfoText}>
  20. <Text style={styles.ContainerInfoTitle}> Container ID: </Text> {item.CtrId}
  21. </Text>
  22. ... // code would be too long to displa
  23. </Block>
  24.  
  25. <Button
  26. ... // code would be too long to display
  27. </Button>
  28. </Block>
  29. }
  30. }
  31. }
  32.  
  33. renderItem = {({item}) => <Item item={item}/>}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement