1import React, { forwardRef } from 'react'; 2import { Linking, Platform } from 'react-native'; 3import Text from '../primitives/Text'; 4export const A = forwardRef(({ href, target, download, rel, ...props }, ref) => { 5 const nativeProps = Platform.select({ 6 web: { 7 href, 8 hrefAttrs: { 9 target, 10 download, 11 rel, 12 }, 13 }, 14 default: { 15 onPress: (event) => { 16 props.onPress && props.onPress(event); 17 if (Platform.OS !== 'web' && href !== undefined) { 18 Linking.openURL(href); 19 } 20 }, 21 }, 22 }); 23 return React.createElement(Text, { accessibilityRole: "link", ...props, ...nativeProps, ref: ref }); 24}); 25//# sourceMappingURL=Anchor.js.map