decord/source/design/components/Menu/native/MenuItem.tsx
github-actions cd74c1f217 chore: update source for alpha 345.5
Skipped 1 file(s) >100MB (GitHub limit): source/__vendor/09xxx/9667_m.js (378 MB)
2026-09-05 10:56:28 +00:00

71 lines
2.2 KiB
TypeScript

// Module ID: 14132
// Function ID: 14133
// Name: MenuItem
// Dependencies: [19, 21, 4560, 14130, 4977, 7137, 7139, 2]
// Module 14132 (MenuItem)
import importAllResult from "noop" /* 19 */;
import { jsx } from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4560 */;
const require = arg1;
let c3 = importAllResult;
let closure_5 = createCacheKey.createStyles({ formIcon: { width: 20, height: 20 }, formLabel: { fontSize: 14, fontWeight: "500" } });
const forwardRefResult = importAllResult.forwardRef((action, ref) => {
({ label, IconComponent, iconSource, showIconFirst } = action);
if (showIconFirst === undefined) {
showIconFirst = false;
}
({ disabled, style } = action);
if (disabled === undefined) {
disabled = false;
}
action = action.action;
let menuClose;
const tmp = callback();
menuClose = importAllResult.useContext(action(14130).MenuContext).menuClose;
if (null != IconComponent) {
let tmp3 = <IconComponent size="sm" />;
} else {
tmp3 = null;
if (null != iconSource) {
let obj = { source: null, style: null };
obj[0] = iconSource;
obj[1] = tmp.formIcon;
tmp3 = jsx(menuClose(4977), { source: null, style: null });
}
}
obj = { ref, style, accessibilityRole: "menuitem", disabled, leading: null, trailing: null, label: null, onPress: null };
let tmp10 = null;
if (null != iconSource) {
tmp10 = null;
if (showIconFirst) {
tmp10 = tmp3;
}
}
obj[4] = tmp10;
let tmp11 = null;
if (null != iconSource) {
tmp11 = null;
if (!showIconFirst) {
tmp11 = tmp3;
}
}
obj[5] = tmp11;
let tmp7Result = label;
if (typeof label === "string") {
obj = { text: null, style: null };
obj[0] = label;
obj[1] = tmp.formLabel;
tmp7Result = tmp7(menuClose(7139), obj);
}
obj[6] = tmp7Result;
obj[7] = function onPress() {
action();
menuClose();
};
return jsx(menuClose(7137), { ref, style, accessibilityRole: "menuitem", disabled, leading: null, trailing: null, label: null, onPress: null });
});
const result = require("set").fileFinishedImporting("design/components/Menu/native/MenuItem.tsx");
export const MenuItem = forwardRefResult;