import React, {useState} from 'react'; import {Alert} from 'react-native'; import { Circle, ClipPath, Defs, G, Path, Rect, Svg, Text, } from 'react-native-svg'; function PressExample() { return ( Alert.alert('Press on Circle')} /> Alert.alert('Long press on Rect')} /> ); } PressExample.title = 'Press on the red circle or long press on the blue rectangle to trigger the events'; function HoverExample() { const [hover, setHover] = useState(false); const toggle = () => { setHover(!hover); }; return ( ); } HoverExample.title = 'Hover the svg path'; function GroupExample() { return ( Alert.alert('Pressed on G')} scale="1.4"> Alert.alert('Pressed on Text')}> H ); } GroupExample.title = 'Bind touch events callback on Group element with viewBox'; const icon = ( ); const samples = [PressExample, HoverExample, GroupExample]; export {icon, samples};