react-native-macos/Libraries/Text
Adrien HARNAY 1d924549ca Add onPressIn & onPressOut props to Text (#31288)
Summary:
I added onPressIn & onPressOut props to Text to help implement custom highlighting logic (e.g. when clicking on a Text segment). Since TouchableOpacity can't be nested in Text having custom lineHeights without bugs in some occasions, this modification helps to replicate its behavior.

## Changelog

[General] [Added] - Add onPressIn & onPressOut props to Text

Pull Request resolved: https://github.com/facebook/react-native/pull/31288

Test Plan:
```
const [pressing, setPressing] = useState(false);

<Text
  onPressIn={() => setPressing(true)}
  onPressOut={() => setPressing(false)}
  style={{ opacity: pressing ? 0.5 : 1 }}
/>
```

Thanks in advance!

Reviewed By: yungsters

Differential Revision: D27945133

Pulled By: appden

fbshipit-source-id: 8342ca5f75986b4644a193d2f71eab3bc0ef1a5f
2021-05-06 12:42:00 -07:00
..
BaseText Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RawText Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
Text remove most of tvOS remnants from the code (#29407) 2020-09-28 21:26:41 -07:00
TextInput Implement caretHidden in multiline text input 2021-03-04 10:53:35 -08:00
VirtualText Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTConvert+Text.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTConvert+Text.m Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTTextAttributes.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTTextAttributes.m Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
RCTTextTransform.h Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
React-RCTText.podspec Resolve "fatal: not a git repository" error outside of git repositories 2021-04-15 13:30:31 -07:00
Text.js Add onPressIn & onPressOut props to Text (#31288) 2021-05-06 12:42:00 -07:00
TextAncestor.js Name a bunch of anonymous RN contexts 2020-11-16 13:12:09 -08:00
TextInjection.js Remove "use strict" directive from ES Modules 2021-02-02 11:12:56 -08:00
TextNativeComponent.js Remove "use strict" directive from ES Modules 2021-02-02 11:12:56 -08:00
TextProps.js Add onPressIn & onPressOut props to Text (#31288) 2021-05-06 12:42:00 -07:00