-
Notifications
You must be signed in to change notification settings - Fork 592
fix: Dark Mode TextInput text color #12037
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,6 +86,7 @@ export default class Composer extends React.Component<Props, State> { | |
{({ color }) => { | ||
// The TextInput loses its isFocused() callback as a styled component | ||
const inputStyles = { | ||
color: color("mono100"), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [nitpick] Consider centralizing the TextInput styles (such as the dark mode color) into a shared style utility to enhance consistency and facilitate future modifications. Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||
flex: 1, | ||
fontSize: 13, | ||
paddingLeft: 10, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ import { | |
Pill, | ||
Spacer, | ||
Text, | ||
useColor, | ||
useSpace, | ||
} from "@artsy/palette-mobile" | ||
import Clipboard from "@react-native-clipboard/clipboard" | ||
|
@@ -291,12 +292,15 @@ const CustomInput: React.FC<{ | |
value: string | undefined | ||
onChangeText: (text: string) => void | ||
}> = ({ value, onChangeText }) => { | ||
const color = useColor() | ||
|
||
return ( | ||
<TextInput | ||
value={value} | ||
onChangeText={onChangeText} | ||
autoCapitalize="none" | ||
style={{ | ||
color: color("mono100"), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [nitpick] Consider extracting the shared TextInput style properties (including dark mode color) into a common style or component to improve maintainability and reduce duplication. Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||
borderColor: "gray", | ||
borderWidth: 1, | ||
height: 45, | ||
|
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.
[nitpick] To reduce duplicated code, consider defining a common style for TextInput elements that incorporates the dark mode text color, which can then be reused across components.
Copilot uses AI. Check for mistakes.