-
Notifications
You must be signed in to change notification settings - Fork 8
Conversation
}; | ||
|
||
return ( | ||
<TextInput |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On my Android device the cursor and the selection is dark green and that doesn't look nice. Use selectionColor
and cursorColor
props to set it to the correct color (dark blue?)
We may need to upgrade RN version for it to look good though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The handles color is broken even on the newest RN version 😅 Apparently this didn't fix it.
Maybe try adding it on the native side like here (in styles.xml
): https://stackoverflow.com/questions/29795197/how-to-change-color-of-edittext-handles
If you've never done anything like this you can always ask me for help
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should work okey now.
import React, { useState } from 'react'; | ||
import { StyleSheet, TextInput } from 'react-native'; | ||
|
||
const StandardTextInputStyles = StyleSheet.create({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't we just name it TextInput
? Adding nothing makes it standard :p
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed styles and props.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@skyman503 What about a component?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I though it's better not to override default names to avoid confusion later on. However, I tried doing that but it makes es-lint angry because of: 'TextInput' is already defined. eslint[@typescript-eslint/no-redeclare]
in the StandardTextInput.tsx
. Idk whether ignoring that is a good idea. WDYT @graszka22 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FIxed.
This change introduces new component that should be used, when asking user for text input.