UNPKG

@nexara/nativeflow

Version:

Beautiful, responsive, and customizable UI components for React Native – built for performance and seamless experiences.

39 lines (38 loc) 992 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _react = require("react"); var _index = require("../StyledComponents/index.js"); var _reactNative = require("react-native"); var _jsxRuntime = require("react/jsx-runtime"); const Link = ({ title = 'Link', href, style, ...rest }) => { const onUserPress = (0, _react.useCallback)(async () => { const supported = await _reactNative.Linking.canOpenURL(href); if (supported) { await _reactNative.Linking.openURL(href); } }, [href]); return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.StyledText, { color: "#0000FF", style: [STYLES.TEXT, style], onPress: onUserPress, ...rest, children: title }); }; var _default = exports.default = Link; const STYLES = _reactNative.StyleSheet.create({ TEXT: { // borderBottomColor: '#0000FF', // borderBottomWidth: 0.8, // alignSelf: 'flex-start', } }); //# sourceMappingURL=Link.js.map