Repository navigation
Commit 8745a75
authored
Remove incorrect underlayColor requirement from TouchableHighlight activeOpacity docs
## Summary:
The `activeOpacity` prop doc on `TouchableHighlight` says it "Requires `underlayColor` to be set", but the component does not need that. `_createExtraStyles()` applies `this.props.activeOpacity ?? 0.85` to the child unconditionally (`packages/react-native/Libraries/Components/Touchable/TouchableHighlight.js:165`), and an unset `underlayColor` falls back to `'black'` (`:168-170`), so `activeOpacity` works with or without an explicit `underlayColor`. This removes the incorrect sentence; nothing else changes.
## Changelog:
[GENERAL] [FIXED] - Remove incorrect underlayColor requirement from TouchableHighlight activeOpacity docs
## Test Plan:
Docs-only change to a prop comment.
- `yarn build-types` and `yarn test-generated-typescript` pass; the generated declarations carry the corrected comment and the committed API snapshot is unchanged.
- `yarn prettier --check` and `yarn eslint --max-warnings 0` on `TouchableHighlight.js` pass, and `git diff --check` is clean.
- No other comment or doc in the repo states the same requirement (`rg` for it returned nothing).
Prepared with AI assistance (Claude Code) and reviewed with GitHub Copilot.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Differential Revision: D130876771
Pull Request resolved: #599011 parent 31de0e6 commit 8745a75
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
0 commit comments