mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Updated docs for next
This commit is contained in:
@@ -45,15 +45,7 @@ at the beginning of the line is indicated by an ellipsis glyph. e.g., "...w
|
||||
missing text in the middle is indicated by an ellipsis glyph. "ab...yz"</li><li><code>tail</code> - The line is displayed so that the beginning fits in the container and the
|
||||
missing text at the end of the line is indicated by an ellipsis glyph. e.g., "abcd..."</li><li><code>clip</code> - Lines are not drawn past the edge of the text container.</li></ul><p>The default is <code>tail</code>.</p><p><code>numberOfLines</code> must be set in conjunction with this prop.</p><blockquote><p><code>clip</code> is working only for iOS</p></blockquote></div></div><div class="prop"><h4 class="propTitle"><a class="anchor" name="numberoflines"></a>numberOfLines <span class="propType">number</span> <a class="hash-link" href="docs/text.html#numberoflines">#</a></h4><div><p>Used to truncate the text with an ellipsis after computing the text
|
||||
layout, including line wrapping, such that the total number of lines
|
||||
does not exceed this number.</p><p>This prop is commonly used with <code>ellipsizeMode</code>.</p></div></div><div class="prop"><h4 class="propTitle"><a class="anchor" name="onlayout"></a>onLayout <span class="propType">function</span> <a class="hash-link" href="docs/text.html#onlayout">#</a></h4><div><p>Invoked on mount and layout changes with</p><p> <code>{nativeEvent: {layout: {x, y, width, height}}}</code></p></div></div><div class="prop"><h4 class="propTitle"><a class="anchor" name="onlongpress"></a>onLongPress <span class="propType">function</span> <a class="hash-link" href="docs/text.html#onlongpress">#</a></h4><div><p>This function is called on long press.</p><p>e.g., `onLongPress={this.increaseSize}>``</p></div></div><div class="prop"><h4 class="propTitle"><a class="anchor" name="onpress"></a>onPress <span class="propType">function</span> <a class="hash-link" href="docs/text.html#onpress">#</a></h4><div><p>This function is called on press.</p><p>e.g., `onPress={() => console.log('1st')}``</p></div></div><div class="prop"><h4 class="propTitle"><a class="anchor" name="style"></a>style <span class="propType">style</span> <a class="hash-link" href="docs/text.html#style">#</a></h4><div class="compactProps"><div class="prop"><h6 class="propTitle"><a href="docs/view.html#style">View#style...</a></h6></div><div class="prop"><h6 class="propTitle">color <span class="propType"><a href="docs/colors.html">color</a></span> </h6></div><div class="prop"><h6 class="propTitle">fontFamily <span class="propType">ReactPropTypes.string</span> </h6></div><div class="prop"><h6 class="propTitle">fontSize <span class="propType">ReactPropTypes.number</span> </h6></div><div class="prop"><h6 class="propTitle">fontStyle <span class="propType">ReactPropTypes.oneOf(['normal', 'italic'])</span> </h6></div><div class="prop"><h6 class="propTitle">fontVariant <span class="propType">ReactPropTypes.arrayOf(
|
||||
ReactPropTypes.oneOf([
|
||||
'small-caps',
|
||||
'oldstyle-nums',
|
||||
'lining-nums',
|
||||
'tabular-nums',
|
||||
'proportional-nums',
|
||||
])
|
||||
)</span> </h6></div><div class="prop"><h6 class="propTitle">fontWeight <span class="propType">ReactPropTypes.oneOf(
|
||||
does not exceed this number.</p><p>This prop is commonly used with <code>ellipsizeMode</code>.</p></div></div><div class="prop"><h4 class="propTitle"><a class="anchor" name="onlayout"></a>onLayout <span class="propType">function</span> <a class="hash-link" href="docs/text.html#onlayout">#</a></h4><div><p>Invoked on mount and layout changes with</p><p> <code>{nativeEvent: {layout: {x, y, width, height}}}</code></p></div></div><div class="prop"><h4 class="propTitle"><a class="anchor" name="onlongpress"></a>onLongPress <span class="propType">function</span> <a class="hash-link" href="docs/text.html#onlongpress">#</a></h4><div><p>This function is called on long press.</p><p>e.g., `onLongPress={this.increaseSize}>``</p></div></div><div class="prop"><h4 class="propTitle"><a class="anchor" name="onpress"></a>onPress <span class="propType">function</span> <a class="hash-link" href="docs/text.html#onpress">#</a></h4><div><p>This function is called on press.</p><p>e.g., `onPress={() => console.log('1st')}``</p></div></div><div class="prop"><h4 class="propTitle"><a class="anchor" name="style"></a>style <span class="propType">style</span> <a class="hash-link" href="docs/text.html#style">#</a></h4><div class="compactProps"><div class="prop"><h6 class="propTitle"><a href="docs/view.html#style">View#style...</a></h6></div><div class="prop"><h6 class="propTitle">color <span class="propType"><a href="docs/colors.html">color</a></span> </h6></div><div class="prop"><h6 class="propTitle">fontFamily <span class="propType">ReactPropTypes.string</span> </h6></div><div class="prop"><h6 class="propTitle">fontSize <span class="propType">ReactPropTypes.number</span> </h6></div><div class="prop"><h6 class="propTitle">fontStyle <span class="propType">ReactPropTypes.oneOf(['normal', 'italic'])</span> </h6></div><div class="prop"><h6 class="propTitle">fontWeight <span class="propType">ReactPropTypes.oneOf(
|
||||
['normal' /*default*/, 'bold',
|
||||
'100', '200', '300', '400', '500', '600', '700', '800', '900']
|
||||
)</span> <div><p>Specifies font weight. The values 'normal' and 'bold' are supported for
|
||||
@@ -67,6 +59,14 @@ fallbacks to <code>left</code> on Android.</p></div></h6></div><div class="prop"
|
||||
{width: ReactPropTypes.number, height: ReactPropTypes.number}
|
||||
)</span> </h6></div><div class="prop"><h6 class="propTitle">textShadowRadius <span class="propType">ReactPropTypes.number</span> </h6></div><div class="prop"><h6 class="propTitle"><span class="platform">android</span>textAlignVertical <span class="propType">ReactPropTypes.oneOf(
|
||||
['auto' /*default*/, 'top', 'bottom', 'center']
|
||||
)</span> </h6></div><div class="prop"><h6 class="propTitle"><span class="platform">ios</span>fontVariant <span class="propType">ReactPropTypes.arrayOf(
|
||||
ReactPropTypes.oneOf([
|
||||
'small-caps',
|
||||
'oldstyle-nums',
|
||||
'lining-nums',
|
||||
'tabular-nums',
|
||||
'proportional-nums',
|
||||
])
|
||||
)</span> </h6></div><div class="prop"><h6 class="propTitle"><span class="platform">ios</span>letterSpacing <span class="propType">ReactPropTypes.number</span> </h6></div><div class="prop"><h6 class="propTitle"><span class="platform">ios</span>textDecorationColor <span class="propType"><a href="docs/colors.html">color</a></span> </h6></div><div class="prop"><h6 class="propTitle"><span class="platform">ios</span>textDecorationStyle <span class="propType">ReactPropTypes.oneOf(
|
||||
['solid' /*default*/, 'double', 'dotted','dashed']
|
||||
)</span> </h6></div><div class="prop"><h6 class="propTitle"><span class="platform">ios</span>writingDirection <span class="propType">ReactPropTypes.oneOf(
|
||||
|
||||
Reference in New Issue
Block a user