Skip to content

Commit

Permalink
Updated README for onPress-Property
Browse files Browse the repository at this point in the history
  • Loading branch information
itinance committed Feb 3, 2017
1 parent 4cfd8f6 commit 5ee0948
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,17 @@ If disabled, it will look up a specific node in the iconSet with the name "$.dis
and apply all their attributes to the `<Image>`-component.
If $disabled was not found, it will default to an opacity of 0.5.

## Make it touchable with "onPress"

It is also possible to encapsulate this icon within a [TouchableOpacity](https://facebook.github.io/react-native/docs/touchableopacity.html) to
make it like a button:
```javascript
<Ikon name="lessons.openLesson" onPress={this.onMyIconPressed} disable={true/false} />
```

The optional property "disabled" will be passed instead to the TouchableOpacity in this case
to provide native feeling of a disabled Touchable-component.

## AutoScaling

If the attribute *autoScale* is true, the width and height will be automatically adjusted to the
Expand Down

0 comments on commit 5ee0948

Please sign in to comment.