@@ -59,7 +59,11 @@ export default function App() {
5959 { /* Layout Measurement */ }
6060 < View style = { styles . section } >
6161 < NitroText style = { styles . sectionTitle } > Layout Measurement</ NitroText >
62- < NitroText style = { styles . measuredText } onLayout = { handleLayout } onTextLayout = { handleTextLayout } >
62+ < NitroText
63+ style = { styles . measuredText }
64+ onLayout = { handleLayout }
65+ onTextLayout = { handleTextLayout }
66+ >
6367 This text demonstrates layout measurement capabilities. The component
6468 can measure its dimensions and report back to JavaScript.
6569 { '\n\n' }
@@ -73,13 +77,30 @@ export default function App() {
7377 < View style = { styles . section } >
7478 < NitroText style = { styles . sectionTitle } > Line Limiting</ NitroText >
7579 < NitroText style = { styles . description } > Two lines maximum:</ NitroText >
80+
81+ { /* BUG: This does not work correctly in NitroText. needs to be fixed. */ }
7682 < NitroText style = { styles . limitedText } numberOfLines = { 2 } >
77- This is a very long text that would normally span multiple lines, but
78- we're limiting it to just two lines. The text will be truncated with
79- an ellipsis when it exceeds the specified number of lines. This is
80- useful for creating consistent layouts in lists or cards where you
81- need predictable text heights.
83+ This is a very long text that would normally{ ' ' }
84+ < NitroText style = { [ styles . limitedText , { fontWeight : 'bold' } ] } >
85+ span multiple lines, but we're limiting it to just two lines. The
86+ text will be truncated with an ellipsis when it exceeds the
87+ specified number of lines. This is useful for creating consistent
88+ layouts in lists or cards where you need predictable text heights.
89+ </ NitroText >
8290 </ NitroText >
91+
92+ < Text style = { [ styles . description , { marginTop : 8 } ] } >
93+ RN Text (with tail ellipsize mode):
94+ </ Text >
95+ < Text style = { styles . limitedText } numberOfLines = { 2 } >
96+ This is a very long text that would normally{ ' ' }
97+ < Text style = { styles . limitedText } >
98+ span multiple lines, but we're limiting it to just two lines. The
99+ text will be truncated with an ellipsis when it exceeds the
100+ specified number of lines. This is useful for creating consistent
101+ layouts in lists or cards where you need predictable text heights.
102+ </ Text >
103+ </ Text >
83104 </ View >
84105
85106 { /* Mixed Content */ }
0 commit comments