mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-05-26 12:29:10 +00:00
add touch event information to readme
This commit is contained in:
@@ -554,6 +554,35 @@ Code explanation:
|
||||
|
||||

|
||||
|
||||
#### Touch Events
|
||||
|
||||
Touch events are supported in react-native-svg. These include:
|
||||
|
||||
- `disabled`
|
||||
- `onPress`
|
||||
- `onPressIn`
|
||||
- `onPressOut`
|
||||
- `onLongPress`
|
||||
- `delayPressIn`
|
||||
- `delayPressOut`
|
||||
- `delayLongPress`
|
||||
|
||||
You can use these events to provide interactivity to your react-native-svg components.
|
||||
|
||||
```html
|
||||
<Circle
|
||||
cx="50%"
|
||||
cy="50%"
|
||||
r="38%"
|
||||
fill="red"
|
||||
onPress={() => alert('Press on Circle')}
|
||||
/>
|
||||
```
|
||||
|
||||

|
||||
|
||||
For more examples of touch in action, checkout the [TouchEvents.js examples](Example/examples/TouchEvents.js).
|
||||
|
||||
### Run example:
|
||||
|
||||
```bash
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 123 KiB |
Reference in New Issue
Block a user