File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,19 @@ export default class ActionButtonItem extends Component {
167
167
textContainerStyle
168
168
] ;
169
169
170
+ const title = (
171
+ React . isValidElement ( this . props . title ) ?
172
+ this . props . title
173
+ : (
174
+ < Text
175
+ allowFontScaling = { false }
176
+ style = { [ styles . text , this . props . textStyle ] }
177
+ >
178
+ { this . props . title }
179
+ </ Text >
180
+ )
181
+ )
182
+
170
183
return (
171
184
< TextTouchable
172
185
background = { touchableBackground (
@@ -177,12 +190,7 @@ export default class ActionButtonItem extends Component {
177
190
onPress = { this . props . onPress }
178
191
>
179
192
< View style = { textStyles } >
180
- < Text
181
- allowFontScaling = { false }
182
- style = { [ styles . text , this . props . textStyle ] }
183
- >
184
- { this . props . title }
185
- </ Text >
193
+ { title }
186
194
</ View >
187
195
</ TextTouchable >
188
196
) ;
You can’t perform that action at this time.
0 commit comments