@dcl/react-ecs 7.27.1-33755622021.commit-da82bfb → 7.27.1-33756439818.commit-3a236ab
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.
|
@@ -49,10 +49,14 @@ export function Button(props) {
|
|
|
49
49
|
...uiTransform
|
|
50
50
|
});
|
|
51
51
|
if (!!props.disabled) {
|
|
52
|
+
// Both objects are shallow copies, so their colors are still the caller's.
|
|
53
|
+
// Dimming them in place would halve the alpha of whatever the scene holds,
|
|
54
|
+
// again on every render, until the color it passed in is fully transparent.
|
|
52
55
|
if (textProps.color)
|
|
53
|
-
textProps.color.a
|
|
54
|
-
if (uiBackgroundProps && uiBackgroundProps.color)
|
|
55
|
-
uiBackgroundProps.color.a
|
|
56
|
+
textProps.color = { ...textProps.color, a: textProps.color.a / 2 };
|
|
57
|
+
if (uiBackgroundProps && uiBackgroundProps.color) {
|
|
58
|
+
uiBackgroundProps.color = { ...uiBackgroundProps.color, a: uiBackgroundProps.color.a / 2 };
|
|
59
|
+
}
|
|
56
60
|
}
|
|
57
61
|
return (ReactEcs.createElement("entity", { onMouseDown: !!props.disabled ? undefined : onMouseDown, onMouseUp: !!props.disabled ? undefined : onMouseUp, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, uiTransform: uiTransformProps, uiText: textProps, uiBackground: uiBackgroundProps }));
|
|
58
62
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/react-ecs",
|
|
3
3
|
"description": "Decentraland ECS",
|
|
4
|
-
"version": "7.27.1-
|
|
4
|
+
"version": "7.27.1-33756439818.commit-3a236ab",
|
|
5
5
|
"author": "DCL",
|
|
6
6
|
"bugs": "https://github.com/decentraland/js-sdk-toolchain/issues",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@dcl/ecs": "7.27.1-
|
|
8
|
+
"@dcl/ecs": "7.27.1-33756439818.commit-3a236ab",
|
|
9
9
|
"react": "^18.2.0",
|
|
10
10
|
"react-reconciler": "^0.29.0"
|
|
11
11
|
},
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"tsconfig": "./tsconfig.json"
|
|
41
41
|
},
|
|
42
42
|
"types": "./dist/index.d.ts",
|
|
43
|
-
"commit": "
|
|
43
|
+
"commit": "3a236ab909c08dc265a66125c7f118402ab3f3c9"
|
|
44
44
|
}
|