Where to find source for IonIcons.Button

Please provide the following:

  1. SDK Version: ~37.0.3
  2. Platforms(Android/iOS/web/all): all

Replace this section with as much relevant information as possible and any relevant code along with your question.

I’m using the button provided by the expo API as per the docs here for a React-native project: https://docs.expo.io/versions/latest/guides/icons/

The doc mentions FontAwesome, but I’m using IonIcon - it seems to be the same interface.

Documentation usually being not quite 100% I’m used to looking into the source with other (ruby) projects usually - but for the life of me, I can’t figure out where this is defined. I’ve opened my node_modules and opened expo there and searched for Button - no results. It mentions being built on top of https://github.com/arniu/react-native-ionicons - but that also has no results for Button.

My specific problem is that I’m struggling to have the “style” attribute passed through to the underlying View for the button (flex is not being set, I’ve also tried ButtonStyle and ViewStyle. But my real goal here is to figure out how to answer these kinds of questions for myself.

<Ionicons.Button
onPress={() => alert(‘press’)}
name=‘ios-thumbs-up’ buttonStyle={{flex: 1]}>
Hi
</Ionicons.Button>

Thanks for any tips you might be able to share,
Kevin

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.