Text docs - Update to improve readability for ellipsizeMode
Summary: added context for easier understanding as 'ellipsizeMode' appears before 'numberOfLines' in https://facebook.github.io/react-native/docs/text.html Explain the **motivation** for making this change. What existing problem does the pull request solve? Upon first reading the Text docs, the ellipsizeMode function is confusing. This update aims to remove the confusion. Closes https://github.com/facebook/react-native/pull/11881 Differential Revision: D4533700 Pulled By: lacker fbshipit-source-id: 948df16235a0ba02c14e630518bbd7261bc2b802
This commit is contained in:
parent
787e2730aa
commit
a9ccc8133e
|
@ -98,6 +98,9 @@ const viewConfig = {
|
|||
const Text = React.createClass({
|
||||
propTypes: {
|
||||
/**
|
||||
* When `numberOfLines` is set, this prop defines how text will be truncated.
|
||||
* `numberOfLines` must be set in conjunction with this prop.
|
||||
*
|
||||
* This can be one of the following values:
|
||||
*
|
||||
* - `head` - The line is displayed so that the end fits in the container and the missing text
|
||||
|
@ -110,8 +113,6 @@ const Text = React.createClass({
|
|||
*
|
||||
* The default is `tail`.
|
||||
*
|
||||
* `numberOfLines` must be set in conjunction with this prop.
|
||||
*
|
||||
* > `clip` is working only for iOS
|
||||
*/
|
||||
ellipsizeMode: PropTypes.oneOf(['head', 'middle', 'tail', 'clip']),
|
||||
|
|
Loading…
Reference in New Issue