Vishal Swaroop
Vishal Swaroop

Reputation: 51

How to add events with NativeBase components

What events are available for the NativeBase components?

Say for example,

What other events those mentioned in React Native are supported with the NativeBase components?

Upvotes: 5

Views: 13759

Answers (2)

Shivam Sinha
Shivam Sinha

Reputation: 5150

This should be as simple as using the onPress method props on the button component:

<Button style={{ backgroundColor: 'grey'}} onPress={() =>alert('Add payment')} block >
<Icon name="ios-add-circle-outline" />
ADD PAYMENT
</Button>

Upvotes: 13

akshay
akshay

Reputation: 517

All the props which are supported by touchable opacity in react native are supported by button component. button component justs adds some extra props along with touchable opacity.

Upvotes: 2

Related Questions