Skip to content

Commit 5d0c779

Browse files
committed
fix: revert transformOrigin use from TextInput
1 parent 61e292c commit 5d0c779

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

src/components/TextInput/Label/InputLabel.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,6 @@ const InputLabel = (props: InputLabelProps) => {
113113
: labeled,
114114
},
115115
],
116-
...(!isWeb &&
117-
Platform.constants.reactNativeVersion.minor >= 78 && {
118-
transformOrigin: 'left',
119-
}),
120116
};
121117

122118
const labelWidth =
@@ -152,8 +148,7 @@ const InputLabel = (props: InputLabelProps) => {
152148
StyleSheet.absoluteFill,
153149
!isWeb && { width },
154150
{ opacity },
155-
(isWeb || Platform.constants.reactNativeVersion.minor <= 77) &&
156-
labelTranslationX,
151+
labelTranslationX,
157152
]}
158153
>
159154
<View

src/components/TextInput/Label/LabelBackground.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from 'react';
2-
import { Animated, StyleSheet, Platform } from 'react-native';
2+
import { Animated, StyleSheet } from 'react-native';
33

44
import AnimatedText from '../../Typography/AnimatedText';
55
import type { LabelBackgroundProps } from '../types';
@@ -17,8 +17,6 @@ const LabelBackground = ({
1717
maxFontSizeMultiplier,
1818
testID,
1919
}: LabelBackgroundProps) => {
20-
const isWeb = Platform.OS === 'web';
21-
2220
const opacity = labeled.interpolate({
2321
inputRange: [0, 0.6],
2422
outputRange: [1, 0],
@@ -52,10 +50,8 @@ const LabelBackground = ({
5250
backgroundColor,
5351
maxHeight: Math.max(roundness / 3, 2),
5452
bottom: Math.max(roundness, 2),
55-
opacity,
56-
},
57-
(isWeb || Platform.constants.reactNativeVersion.minor <= 77) && {
5853
transform: [labelTranslationX],
54+
opacity,
5955
},
6056
]}
6157
/>

0 commit comments

Comments
 (0)