@widergy/mobile-ui 0.35.0 → 0.35.1
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/CHANGELOG.md +7 -0
- package/lib/components/UTSwitch/index.js +6 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [0.35.1](https://github.com/widergy/mobile-ui/compare/v0.35.0...v0.35.1) (2022-07-14)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* adding a parameter to utswitch ([#223](https://github.com/widergy/mobile-ui/issues/223)) ([2c3bb48](https://github.com/widergy/mobile-ui/commit/2c3bb480da94325c20480f834ffa1f166be9b135))
|
|
7
|
+
|
|
1
8
|
# [0.35.0](https://github.com/widergy/mobile-ui/compare/v0.34.3...v0.35.0) (2022-06-03)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -20,7 +20,8 @@ const UTSwitch = ({
|
|
|
20
20
|
trackSize = 20,
|
|
21
21
|
input,
|
|
22
22
|
thumbSize = 10,
|
|
23
|
-
rippleSize = 3
|
|
23
|
+
rippleSize = 3,
|
|
24
|
+
movingStartPosition
|
|
24
25
|
}) => {
|
|
25
26
|
const theme = useTheme();
|
|
26
27
|
|
|
@@ -122,7 +123,10 @@ const UTSwitch = ({
|
|
|
122
123
|
{
|
|
123
124
|
translateX: switchPosition.interpolate({
|
|
124
125
|
inputRange: [0, 1],
|
|
125
|
-
outputRange: [
|
|
126
|
+
outputRange: [
|
|
127
|
+
movingStartPosition ? thumpInitPosition - movingStartPosition : thumpInitPosition,
|
|
128
|
+
thumpFinishPosition
|
|
129
|
+
]
|
|
126
130
|
})
|
|
127
131
|
}
|
|
128
132
|
]
|
package/package.json
CHANGED