Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4791.js (118.4 MB)
59 lines
2.4 KiB
TypeScript
59 lines
2.4 KiB
TypeScript
// Module ID: 8172
|
|
// Function ID: 8173
|
|
// Name: IconButton
|
|
// Dependencies: [19, 21, 4606, 576, 5034, 8173, 4602, 2]
|
|
|
|
// Module 8172 (IconButton)
|
|
import nativeDefault from "native" /* 576 */;
|
|
import Text_Text from "Text/Text" /* 4602 */;
|
|
import Button_BaseButton from "Button/BaseButton" /* 5034 */;
|
|
import BaseIconButton from "BaseIconButton" /* 8173 */;
|
|
import noop from "module_19" /* 19 */;
|
|
|
|
require = fn;
|
|
const jsxProd = fn(21);
|
|
({ jsx: c3, jsxs: closure_4 } = jsxProd);
|
|
const createStyles = fn(4606);
|
|
let closure_5 = createStyles.createStyles((arg0) => {
|
|
const labelPressable = { paddingBottom: nativeDefault.space.PX_4, gap: nativeDefault.space.PX_8, alignItems: "center", alignSelf: "center", flexGrow: null };
|
|
let num = 0;
|
|
if (arg0) {
|
|
num = 1;
|
|
}
|
|
labelPressable.flexGrow = num;
|
|
return { labelPressable, label: { textAlign: "center" } };
|
|
});
|
|
const size = fn(2);
|
|
const result = size.fileFinishedImporting("design/components/Button/native/IconButton.native.tsx");
|
|
|
|
export const IconButton = noop.forwardRef((grow, ref) => {
|
|
({ label, accessibilityLabel, maxFontSizeMultiplier, accessibilityHint } = grow);
|
|
const merged = Object.assign(grow, Object.assign({ label: 0, grow: 0, accessibilityLabel: 0, maxFontSizeMultiplier: 0, accessibilityHint: 0 }));
|
|
const tmp2 = closure_5(grow.grow);
|
|
if (null != label) {
|
|
const obj2 = { style: tmp2.labelPressable };
|
|
const merged1 = Object.assign(merged);
|
|
obj2.variant = "none";
|
|
obj2.accessibilityLabel = accessibilityLabel;
|
|
obj2.accessibilityHint = accessibilityHint;
|
|
const obj3 = { ref };
|
|
const merged2 = Object.assign(merged);
|
|
obj3.accessibilityRole = "none";
|
|
obj3.accessibilityLabel = "";
|
|
obj3.size = "lg";
|
|
obj3.maxFontSizeMultiplier = maxFontSizeMultiplier;
|
|
const items = [React3(BaseIconButton.BaseIconButton, obj3), ];
|
|
const obj4 = { style: tmp2.label, variant: "text-xs/medium", color: "interactive-text-default", maxFontSizeMultiplier, children: label };
|
|
items[1] = React3(Text_Text.Text, obj4);
|
|
obj2.children = items;
|
|
let tmp9 = React4(Button_BaseButton.BaseButton, obj2);
|
|
} else {
|
|
const obj = { ref };
|
|
const merged3 = Object.assign(merged);
|
|
obj.accessibilityLabel = accessibilityLabel;
|
|
obj.accessibilityHint = accessibilityHint;
|
|
obj.maxFontSizeMultiplier = maxFontSizeMultiplier;
|
|
tmp9 = React3(BaseIconButton.BaseIconButton, obj);
|
|
}
|
|
return tmp9;
|
|
});
|