43 lines
1.4 KiB
TypeScript
43 lines
1.4 KiB
TypeScript
// Module ID: 13504
|
|
// Function ID: 13505
|
|
// Name: IntlLink
|
|
// Dependencies: [19, 21, 4342, 712, 1356, 4058, 4060, 1297, 2]
|
|
// Exports: IntlLink
|
|
|
|
// Module 13504 (IntlLink)
|
|
import noop from "noop";
|
|
import { jsx } from "jsxProd";
|
|
import createCacheKey from "createCacheKey";
|
|
|
|
const require = arg1;
|
|
let closure_5 = createCacheKey.createStyles((arg0) => {
|
|
const link = { color: importDefault(712).colors.TEXT_LINK, textDecorationLine: null };
|
|
let str = "none";
|
|
if (arg0) {
|
|
str = "underline";
|
|
}
|
|
link[1] = str;
|
|
return { link };
|
|
});
|
|
const result = require("createCacheKey").fileFinishedImporting("intl/native/migration.tsx");
|
|
|
|
export const IntlLink = function IntlLink(children) {
|
|
const target = children.target;
|
|
if (typeof target === "string") {
|
|
let fn = () => {
|
|
const obj = outer1_1(outer1_2[5]);
|
|
return obj.openURL(outer1_1(outer1_2[6]).sanitizeUrl(target));
|
|
};
|
|
} else {
|
|
fn = target;
|
|
if (typeof target === "object") {
|
|
fn = target;
|
|
if (null != target.onClick) {
|
|
fn = target.onClick;
|
|
}
|
|
}
|
|
}
|
|
const tmp = target;
|
|
const tmp3 = callback(React.useContext(target(1356).AccessibilityPreferencesContext).alwaysShowLinkDecorations);
|
|
return jsx(tmp(1297).LegacyText, { accessible: true, accessibilityRole: "link", onPress: fn, style: callback(React.useContext(target(1356).AccessibilityPreferencesContext).alwaysShowLinkDecorations).link, children: children.children });
|
|
};
|