From 0c5c07fc9bf2ca13aece3dd9fa35d6c822f1fd84 Mon Sep 17 00:00:00 2001 From: Jerry Date: Mon, 20 Mar 2023 05:16:20 -0700 Subject: [PATCH] fix: add missing lineBreakStrategyIOS types for Text, TextInput (#36526) Summary: I added missing type `lineBreakStrategyIOS` for Text and TextInput. ([Text docs](https://reactnative.dev/docs/text)) ## Changelog [GENERAL] [FIXED] - add `lineBreakStrategyIOS` prop type for Text and TextInput Pull Request resolved: https://github.com/facebook/react-native/pull/36526 Test Plan: Ran `yarn test-typescript` and `yarn test-typescript-offline` with no errors. Reviewed By: jacdebug Differential Revision: D44213791 Pulled By: javache fbshipit-source-id: 8d0d44e2cdd1fa362c54935326e86dde88c5ba0b --- .../Libraries/Components/TextInput/TextInput.d.ts | 10 ++++++++++ packages/react-native/Libraries/Text/Text.d.ts | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/packages/react-native/Libraries/Components/TextInput/TextInput.d.ts b/packages/react-native/Libraries/Components/TextInput/TextInput.d.ts index 80e8df0c03..1a5ce640b2 100644 --- a/packages/react-native/Libraries/Components/TextInput/TextInput.d.ts +++ b/packages/react-native/Libraries/Components/TextInput/TextInput.d.ts @@ -272,6 +272,16 @@ export interface TextInputIOSProps { * If false, scrolling of the text view will be disabled. The default value is true. Only works with multiline={true} */ scrollEnabled?: boolean | undefined; + + /** + * Set line break strategy on iOS. + */ + lineBreakStrategyIOS?: + | 'none' + | 'standard' + | 'hangul-word' + | 'push-out' + | undefined; } /** diff --git a/packages/react-native/Libraries/Text/Text.d.ts b/packages/react-native/Libraries/Text/Text.d.ts index a52f4467e1..bee0c63237 100644 --- a/packages/react-native/Libraries/Text/Text.d.ts +++ b/packages/react-native/Libraries/Text/Text.d.ts @@ -53,6 +53,16 @@ export interface TextPropsIOS { * default, a gray oval highlights the text on press down. */ suppressHighlighting?: boolean | undefined; + + /** + * Set line break strategy on iOS. + */ + lineBreakStrategyIOS?: + | 'none' + | 'standard' + | 'hangul-word' + | 'push-out' + | undefined; } export interface TextPropsAndroid {