Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion example/src/Examples/TextInputExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const TextInputExample = () => {
return (
<TextInputAvoidingView>
<ScreenWrapper
style={styles.container}
contentContainerStyle={styles.container}
keyboardShouldPersistTaps={'always'}
removeClippedSubviews={false}
>
Expand Down Expand Up @@ -435,6 +435,15 @@ const TextInputExample = () => {
}}
/>
</View>
<View style={styles.inputContainerStyle}>
<TextInput
mode="outlined"
theme={{
roundness: 25,
}}
label="Custom rounded input"
/>
</View>
</ScreenWrapper>
</TextInputAvoidingView>
);
Expand Down
3 changes: 1 addition & 2 deletions src/components/TextInput/Label/LabelBackground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ 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 @@ -15,6 +14,7 @@ const LabelBackground = ({
hasActiveOutline,
label,
backgroundColor,
roundness,
},
labelStyle,
}: LabelBackgroundProps) => {
Expand All @@ -23,7 +23,6 @@ const LabelBackground = ({
inputRange: [0, 1],
outputRange: [hasFocus ? 1 : 0, 0],
});
const { roundness } = useTheme();

const labelTranslationX = {
transform: [
Expand Down
1 change: 1 addition & 0 deletions src/components/TextInput/TextInputFlat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ class TextInputFlat extends React.Component<ChildTextInputProps> {
activeColor,
placeholderColor,
errorColor,
roundness: theme.roundness,
};
const affixTopPosition = {
[AdornmentSide.Left]: leftAffixTopPosition,
Expand Down
1 change: 1 addition & 0 deletions src/components/TextInput/TextInputOutlined.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ class TextInputOutlined extends React.Component<ChildTextInputProps> {
backgroundColor: backgroundColor as ColorValue,
errorColor,
labelTranslationXOffset,
roundness: theme.roundness,
};

const minHeight = (height ||
Expand Down
1 change: 1 addition & 0 deletions src/components/TextInput/types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export type LabelProps = {
errorColor?: string;
error?: boolean | null;
onLayoutAnimatedText: (args: any) => void;
roundness: number;
};
export type InputLabelProps = {
parentState: State;
Expand Down