Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Item extend React.Component {
- state = {
- checked: false,
- }
- render() {
- return() {
- <Block padding={[10, 15, 20, 15]} color='#EFF8FF' margin={[0, 0, 1, 0]} row center middle key={index}>
- <Block styles={styles.ContainerAssign} flex={0.3}>
- <Switch
- style={{ transform: [{ scaleX: .8 }, { scaleY: .8 }] }}
- value={this.state.checked} // i would like to check just one of these
- testID={index}
- onValueChange={(value) => this.containerSelected(value, item, index)}
- />
- </Block>
- <Block styles={styles.ContainerInfo} padding={[0, 5, 0, 0]}>
- <Text style={styles.ContainerInfoText}>
- <Text style={styles.ContainerInfoTitle}> Container ID: </Text> {item.CtrId}
- </Text>
- ... // code would be too long to displa
- </Block>
- <Button
- ... // code would be too long to display
- </Button>
- </Block>
- }
- }
- }
- renderItem = {({item}) => <Item item={item}/>}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement