fix(app): make sheet header search text readable in dark mode
The model picker search input rendered text in the light-theme foreground color on a dark surface, leaving typed characters invisible. @gorhom/bottom-sheet mounts header subtrees before the sheet is visible and keeps them mounted across theme changes, so any color read from StyleSheet.create((theme) => ...) at the caller goes stale. Move text color and placeholder color into AdaptiveTextInput itself via withUnistyles, with the leaf's color appended last so callers cannot re-introduce a stale read. Drop the now-redundant placeholderTextColor props at the header search call sites. Also ban useUnistyles() in docs/unistyles.md. The hook subscribes to every runtime change and forces a re-render each cycle; new code uses withUnistyles or StyleSheet.create instead.
This commit is contained in:
@@ -194,7 +194,6 @@ export function SearchInput({
|
||||
// @ts-expect-error - outlineStyle is web-only
|
||||
style={SEARCH_INPUT_STYLE}
|
||||
placeholder={placeholder}
|
||||
placeholderTextColor={theme.colors.foregroundMuted}
|
||||
initialValue={value}
|
||||
resetKey={resetKey}
|
||||
value={value}
|
||||
|
||||
Reference in New Issue
Block a user