File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ export default function AppleButton(props) {
1616 buttonType = ButtonTypes . DEFAULT ,
1717 onPress,
1818 leftView,
19+ buttonText,
1920 } = props ;
2021
2122 const _buttonStyle = [
@@ -30,11 +31,13 @@ export default function AppleButton(props) {
3031 textStyle ,
3132 ] ;
3233
34+ const text = buttonText ? buttonText : ButtonTexts [ buttonType ] ;
35+
3336 return (
3437 < TouchableOpacity onPress = { onPress } activeOpacity = { 0.8 } style = { _buttonStyle } >
3538 < View style = { { flexDirection : 'row' } } >
3639 { ! ! leftView && leftView }
37- < Text style = { _textStyle } > { ButtonTexts [ buttonType ] } </ Text >
40+ < Text style = { _textStyle } > { text } </ Text >
3841 </ View >
3942 </ TouchableOpacity >
4043 ) ;
Original file line number Diff line number Diff line change @@ -112,6 +112,11 @@ export interface AppleButtonProps {
112112 */
113113 leftView ?: React . ReactNode ;
114114
115+ /**
116+ * Android-only. Custom button text.
117+ */
118+ buttonText ?: string ;
119+
115120 onPress : ( event : GestureResponderEvent ) => void ;
116121}
117122
You can’t perform that action at this time.
0 commit comments