Skip to content

Commit

Permalink
fix: add missing lineBreakStrategyIOS types for Text, TextInput (#36526)
Browse files Browse the repository at this point in the history
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

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

Pull Request resolved: #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
  • Loading branch information
jeongshin authored and facebook-github-bot committed Mar 20, 2023
1 parent 0eff8d6 commit 0c5c07f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down
10 changes: 10 additions & 0 deletions packages/react-native/Libraries/Text/Text.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 0c5c07f

Please sign in to comment.