File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed
Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -78,9 +78,11 @@ export default function App() {
7878 < / View>
7979
8080 < SubmitButton
81- title= " Pay Now"
8281 style= {styles .button }
83- textStyle= {styles .buttonText }
82+ textInputProps= {{
83+ title: " Pay Now" ,
84+ style: styles .buttonText ,
85+ }}
8486 onPress= {() => console .log (" merchant action" )}
8587 / >
8688 < / Frames>
Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ const SubmitButton: React.FunctionComponent<SubmitButtonProps> = (props) => {
1111 throw "It looks like you are trying to render the SubmitButton outside of the Frames Component." ;
1212 }
1313
14- const { textStyle : textStyle , title : title , ...touchableProps } = props ;
14+ const { textInputProps = { } , ...touchableProps } = props ;
15+ const { title } = textInputProps ;
1516
1617 return (
1718 < TouchableOpacity
@@ -22,7 +23,7 @@ const SubmitButton: React.FunctionComponent<SubmitButtonProps> = (props) => {
2223 if ( props . onPress ) props . onPress ( e ) ;
2324 } }
2425 >
25- < Text style = { [ styles . buttonText , textStyle ] } > { title } </ Text >
26+ < Text { ... textInputProps } style = { [ styles . buttonText , textInputProps . style ] } > { title } </ Text >
2627 </ TouchableOpacity >
2728 ) ;
2829 } }
Original file line number Diff line number Diff line change @@ -194,6 +194,5 @@ export interface CardBinChangedEvent {
194194}
195195
196196export interface SubmitButtonProps extends TouchableOpacityProps {
197- title : string ;
198- textStyle ?: TextProps ;
197+ textInputProps ?: TextInputProps ;
199198}
You can’t perform that action at this time.
0 commit comments