react-crud-mobile 1.3.555 → 1.3.556
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/elements/core/UIButton.tsx +5 -8
package/dist/index.js
CHANGED
|
@@ -418,9 +418,10 @@ function UIButton(props) {
|
|
|
418
418
|
let label = scope.getLabel();
|
|
419
419
|
let icon = scope.getPart("icon");
|
|
420
420
|
let children = import_react_crud_utils5.ComponentUtils.getChild(props, "button");
|
|
421
|
-
const
|
|
421
|
+
const pressed = (0, import_react_native_reanimated.useSharedValue)(0);
|
|
422
422
|
const animatedStyle = (0, import_react_native_reanimated.useAnimatedStyle)(() => ({
|
|
423
|
-
transform: [{
|
|
423
|
+
transform: [{ translateY: (0, import_react_native_reanimated.withTiming)(pressed.value ? 2 : 0, { duration: 80 }) }],
|
|
424
|
+
opacity: (0, import_react_native_reanimated.withTiming)(pressed.value ? 0.9 : 1, { duration: 80 })
|
|
424
425
|
}));
|
|
425
426
|
if (!color) color = "primaryLight";
|
|
426
427
|
const styles13 = {
|
|
@@ -462,8 +463,6 @@ function UIButton(props) {
|
|
|
462
463
|
}
|
|
463
464
|
};
|
|
464
465
|
const onClick = () => {
|
|
465
|
-
scale.value = (0, import_react_native_reanimated.withSpring)(1.2);
|
|
466
|
-
setTimeout(() => scale.value = (0, import_react_native_reanimated.withSpring)(1), 150);
|
|
467
466
|
if (!import_react_crud_utils5.Utils.isEmpty(children)) {
|
|
468
467
|
setOpen(true);
|
|
469
468
|
return;
|
|
@@ -533,7 +532,7 @@ function UIButton(props) {
|
|
|
533
532
|
] }) });
|
|
534
533
|
}
|
|
535
534
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
|
|
536
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native5.Pressable, { onPress: onClick, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native_reanimated.default.View, { style: [buttonStyle, animatedStyle], children: [
|
|
535
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native5.Pressable, { onPress: onClick, onPressIn: () => pressed.value = 1, onPressOut: () => pressed.value = 0, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native_reanimated.default.View, { style: [buttonStyle, animatedStyle], children: [
|
|
537
536
|
icon && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(UI_default.Icon, { size: iconSize, style: iconStyle, value: icon }),
|
|
538
537
|
label && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native5.Text, { style: buttonLabel, children: label })
|
|
539
538
|
] }) }),
|