Nativebase: How to user onPress in a Card item

Created on 25 Aug 2016  路  7Comments  路  Source: GeekyAnts/NativeBase

How can a use onPress prop in a CardItem?
I read about user button prop, but i din't see anything in code, can anyone show an example?

Most helpful comment

@bielcapanema

<CardItem button onPress={() => Alert.alert('hi')}>

Where is this documented? First time hearing about button prop.

All 7 comments

The use case is same as in a ListItem. Just use button prop to CardItem.

I try but it seems to not work.. can you please show me an example?

@bielcapanema

<CardItem button onPress={() => Alert.alert('hi')}>

Where is this documented? First time hearing about button prop.

@ALawliet The latest docs for NativeBase is for v0.5.5
And the button prop for CardItem has been updated yesterday in 0.5.6 release
This will be soon documented.

updated the package and worked for me, thanks!

Check the latest docs of NativeBase 0.5.9

How can a use onPress prop in a CardItem?
I read about user button prop, but i din't see anything in code, can anyone show an example?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

muthuraman007 picture muthuraman007  路  3Comments

eggybot picture eggybot  路  3Comments

mcpracht picture mcpracht  路  3Comments

chetnadaffodil picture chetnadaffodil  路  3Comments

kitsune7 picture kitsune7  路  3Comments