Skip to content

Commit 9037214

Browse files
committed
refactor: label opacity interpolation
1 parent 0249f37 commit 9037214

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/components/TextInput/Label/InputLabel.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,10 @@ const InputLabel = (props: InputLabelProps) => {
6161
fontSize,
6262
lineHeight,
6363
fontWeight,
64-
opacity: hasActiveOutline
65-
? labeled.interpolate({
66-
inputRange: [0, 1],
67-
outputRange: [1, 0],
68-
})
69-
: 0,
64+
opacity: labeled.interpolate({
65+
inputRange: [0, 1],
66+
outputRange: [hasActiveOutline ? 1 : 0, 0],
67+
}),
7068
transform: [
7169
{
7270
// Wiggle the label when there's an error

0 commit comments

Comments
 (0)