File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1192,7 +1192,7 @@ class InputSpinner extends Component {
11921192 : this . props . buttonLeftText
11931193 ? this . props . buttonLeftText
11941194 : "-" ;
1195- return < Text style = { this . _getStyleLeftButtonText ( ) } > { text } </ Text > ;
1195+ return < Text { ... this . props . buttonTextProps } style = { this . _getStyleLeftButtonText ( ) } > { text } </ Text > ;
11961196 }
11971197 }
11981198
@@ -1216,7 +1216,7 @@ class InputSpinner extends Component {
12161216 : this . props . buttonRightText
12171217 ? this . props . buttonRightText
12181218 : "+" ;
1219- return < Text style = { this . _getStyleRightButtonText ( ) } > { text } </ Text > ;
1219+ return < Text { ... this . props . buttonTextProps } style = { this . _getStyleRightButtonText ( ) } > { text } </ Text > ;
12201220 }
12211221 }
12221222
@@ -1450,6 +1450,7 @@ InputSpinner.propTypes = {
14501450 inputProps : PropTypes . object ,
14511451 leftButtonProps : PropTypes . object ,
14521452 rightButtonProps : PropTypes . object ,
1453+ buttonTextProps : PropTypes . object ,
14531454} ;
14541455
14551456InputSpinner . defaultProps = {
@@ -1510,6 +1511,7 @@ InputSpinner.defaultProps = {
15101511 inputProps : null ,
15111512 leftButtonProps : null ,
15121513 rightButtonProps : null ,
1514+ buttonTextProps : null ,
15131515} ;
15141516
15151517export default InputSpinner ;
Original file line number Diff line number Diff line change 11import React , { Component } from "react" ;
2- import { StyleProp , ViewStyle } from "react-native" ;
2+ import { StyleProp , TextProps , ViewStyle } from "react-native" ;
33
44export interface ReactNativeInputSpinnerProps {
55 type ?: string ;
@@ -78,5 +78,6 @@ export interface ReactNativeInputSpinnerProps {
7878 inputProps ?: object ;
7979 leftButtonProps ?: object ;
8080 rightButtonProps ?: object ;
81+ buttonTextProps ?: TextProps ;
8182}
8283export default class InputSpinner extends Component < ReactNativeInputSpinnerProps > { }
You can’t perform that action at this time.
0 commit comments