kia-ml
Version:
Kia
22 lines (20 loc) • 499 B
JavaScript
import * as React from "react";
import { Linking, Platform } from "react-native";
import { Text } from "react-native";
const openLink = link => {
if (Platform.OS === "web") {
window.open(link, '_blank');
} else {
Linking.openURL(link);
}
};
export function LinkText(props) {
return /*#__PURE__*/React.createElement(Text, {
style: {
color: 'blue'
},
numberOfLines: 1,
onPress: () => openLink(props.url)
}, props.text);
}
//# sourceMappingURL=link-text.js.map