import React, { Component } from 'react'; import Svg, { Circle, Path, Rect, G } from 'react-native-svg'; class PressExample extends Component { static title = 'Press on the red circle or long press on the blue rectangle to trigger the events'; render () { return alert('Press on Circle')} /> alert('Long press on Rect')} /> ; } } class HoverExample extends Component { static title = 'Hover the svg path'; constructor () { super(...arguments); this.state = { hover: false }; } toggle = () => { this.setState({hover: !this.state.hover}); }; render () { return ; } } class GroupExample extends Component { static title = 'Bind touch events callback on Group element'; render () { return alert('Pressed')}> ; } } const icon = ; const samples = [ PressExample, HoverExample, GroupExample ]; export { icon, samples };