-
-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: align Android implementation with iOS
- Loading branch information
1 parent
3934a03
commit 6c10332
Showing
12 changed files
with
185 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 19 additions & 10 deletions
29
FabricExample/src/screens/Examples/AwareScrollView/TextInput.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,32 @@ | ||
import React from 'react'; | ||
import { TextInputProps, TextInput as TextInputRN } from 'react-native'; | ||
import { randomColor } from '../../../utils'; | ||
import { StyleSheet, TextInputProps, TextInput as TextInputRN } from 'react-native'; | ||
|
||
const TextInput = (props: TextInputProps) => { | ||
return ( | ||
<TextInputRN | ||
placeholderTextColor="black" | ||
style={{ | ||
width: '100%', | ||
minHeight: 50, | ||
maxHeight: 200, | ||
backgroundColor: randomColor(), | ||
marginTop: 50, | ||
}} | ||
placeholderTextColor="#6c6c6c" | ||
style={styles.container} | ||
multiline | ||
numberOfLines={10} | ||
{...props} | ||
placeholder={`${props.placeholder} (${props.keyboardType === 'default' ? 'text' : 'numeric'})`} | ||
/> | ||
); | ||
}; | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
width: '100%', | ||
minHeight: 50, | ||
maxHeight: 200, | ||
marginTop: 50, | ||
borderColor: 'black', | ||
borderWidth: 2, | ||
marginRight: 160, | ||
borderRadius: 10, | ||
color: 'black', | ||
paddingHorizontal: 12, | ||
}, | ||
}); | ||
|
||
export default TextInput; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.