Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- accessibilityLabel={title ? `${title}, back` : 'Go back'}
- accessibilityTraits="button"
- testID="header-back"
- static navigationOptions = {
- headerTitle: 'Title',
- headerRight: (
- <Button
- onPress={() => alert('This is a button!')}
- title="Right"
- color="#000"
- testID='headerRightButton'
- accessibilityLabel="Right button!"
- />
- ),
- headerLeft: (
- <Button
- onPress={() => alert('This is a button!')}
- title="Left"
- color="#000"
- testID='headerLeftButton'
- accessibilityLabel="Left button!"
- />
- )
- };
- class MyButton extends Component {
- render() {
- return (
- <TouchableOpacity onPress={() => {}}
- testID={this.props.testID}
- accessibilityLabel={this.props.accessibilityLabel}
- >
- <View>
- // style your awesome button here
- </View>
- </TouchableOpacity>
- );
- }
- }
- <MyButton
- testID={'mybutton'}
- accessibilityLabel={'tap my button'} />
Add Comment
Please, Sign In to add comment