Skip to content

Commit 87a67e7

Browse files
committed
Resolved misaligned helper text.
1 parent 0c9546d commit 87a67e7

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

src/Date/DatePickerInput.tsx

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,12 @@ function DatePickerInput(
8585
onPress={() => setVisible(true)}
8686
/>
8787
) : null}
88+
<View style={styles.helperText}>
89+
<HelperText style={styles.helperText} type="error" visible={!!error}>
90+
{error}
91+
</HelperText>
92+
</View>
8893
</View>
89-
<HelperText type="error" visible={!!error}>
90-
{error}
91-
</HelperText>
92-
9394
{withModal ? (
9495
<DatePickerModal
9596
date={value}
@@ -124,13 +125,14 @@ function getLabel({
124125
const styles = StyleSheet.create({
125126
root: {
126127
minWidth: 150,
127-
flexDirection: 'row',
128-
position: 'relative',
129-
alignItems: 'center',
128+
display: "flex",
130129
flexGrow: 1,
131130
},
132-
input: {
133-
flexGrow: 1,
131+
helperTextContainer: {
132+
flexDirection: 'row'
133+
},
134+
helperText: {
135+
flex: 1,
134136
},
135137
calendarButton: { position: 'absolute', right: 0, zIndex: 10 },
136138
})

0 commit comments

Comments
 (0)