Skip to content

Commit

Permalink
fix: patch for text input label (#2678)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukewalczak authored Apr 23, 2021
1 parent 45c48a1 commit 4bba7d4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/TextInput/Label/LabelBackground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import * as React from 'react';
import { Animated, StyleSheet } from 'react-native';

import AnimatedText from '../../Typography/AnimatedText';
import { useTheme } from '../../../core/theming';

import type { LabelBackgroundProps } from '../types';

Expand All @@ -22,6 +23,7 @@ const LabelBackground = ({
inputRange: [0, 1],
outputRange: [hasFocus ? 1 : 0, 0],
});
const { roundness } = useTheme();

const labelTranslationX = {
transform: [
Expand All @@ -45,6 +47,7 @@ const LabelBackground = ({
{
backgroundColor,
opacity,
bottom: Math.max(roundness, 2),
},
labelTranslationX,
]}
Expand Down Expand Up @@ -86,7 +89,6 @@ const styles = StyleSheet.create({
top: 6,
left: 10,
width: 8,
bottom: 2,
},
outlinedLabel: {
position: 'absolute',
Expand Down

0 comments on commit 4bba7d4

Please sign in to comment.