Skip to content

Commit 3c1cb10

Browse files
Merge pull request #158 from iM-GeeKy/helper-text-styles
Resolved misaligned helper text.
2 parents 513b936 + 87a67e7 commit 3c1cb10

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
@@ -87,11 +87,12 @@ function DatePickerInput(
8787
onPress={() => setVisible(true)}
8888
/>
8989
) : null}
90+
<View style={styles.helperText}>
91+
<HelperText style={styles.helperText} type="error" visible={!!error}>
92+
{error}
93+
</HelperText>
94+
</View>
9095
</View>
91-
<HelperText type="error" visible={!!error}>
92-
{error}
93-
</HelperText>
94-
9596
{withModal ? (
9697
<DatePickerModal
9798
date={value}
@@ -126,13 +127,14 @@ function getLabel({
126127
const styles = StyleSheet.create({
127128
root: {
128129
minWidth: 150,
129-
flexDirection: 'row',
130-
position: 'relative',
131-
alignItems: 'center',
130+
display: "flex",
132131
flexGrow: 1,
133132
},
134-
input: {
135-
flexGrow: 1,
133+
helperTextContainer: {
134+
flexDirection: 'row'
135+
},
136+
helperText: {
137+
flex: 1,
136138
},
137139
calendarButton: { position: 'absolute', right: 0, zIndex: 10 },
138140
})

0 commit comments

Comments
 (0)