Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5014.js (118.4 MB)
47 lines
1.7 KiB
TypeScript
47 lines
1.7 KiB
TypeScript
// Module ID: 14500
|
|
// Function ID: 14501
|
|
// Name: AIGlyphText
|
|
// Dependencies: [19, 17, 21, 4561, 4829, 14501, 4526, 2]
|
|
// Exports: AIGlyphText
|
|
|
|
// Module 14500 (AIGlyphText)
|
|
import useToken from "useToken" /* 4526 */;
|
|
import AIGlyphFont from "AIGlyphFont" /* 14501 */;
|
|
import noop from "module_19" /* 19 */;
|
|
import ReanimatedRexport from "ReanimatedRexport" /* 4561 */;
|
|
|
|
require = fn;
|
|
const Text = fn(17).Text;
|
|
const jsx = fn(21).jsx;
|
|
let closure_4 = ReanimatedRexport.createAnimatedComponent(Text);
|
|
const createStyles = fn(4829);
|
|
let closure_5 = createStyles.createStyles((fontSize, color) => {
|
|
const obj = { glyph: { color, fontFamily: AIGlyphFont.AI_GLYPH_FONT_FAMILY_NATIVE, fontSize, lineHeight: fontSize, textAlign: "center", includeFontPadding: false } };
|
|
return obj;
|
|
});
|
|
const size = fn(2);
|
|
const result = size.fileFinishedImporting("design/visual-identities/ai/AIGlyphText.native.tsx");
|
|
|
|
export const AIGlyphText = function AIGlyphText(color) {
|
|
let str = color.color;
|
|
if (str === undefined) {
|
|
str = "text-default";
|
|
}
|
|
({ animated, allowFontScaling } = color);
|
|
if (animated === undefined) {
|
|
animated = false;
|
|
}
|
|
({ numberOfLines, ellipsizeMode, style, children } = color);
|
|
let tmp;
|
|
if ("none" !== str) {
|
|
tmp = str;
|
|
}
|
|
const obj2 = { style: null, allowFontScaling: null, numberOfLines: null, ellipsizeMode: null, children: null };
|
|
const items = [closure_5(color.size, useToken.useToken(tmp)).glyph, style];
|
|
obj2.style = items;
|
|
obj2.allowFontScaling = allowFontScaling;
|
|
obj2.numberOfLines = numberOfLines;
|
|
obj2.ellipsizeMode = ellipsizeMode;
|
|
obj2.children = children;
|
|
return jsx(animated ? closure_4 : Text, { style: null, allowFontScaling: null, numberOfLines: null, ellipsizeMode: null, children: null });
|
|
};
|