Skip to content

Commit 6ebb7b6

Browse files
authored
Fixed button (#8130)
1 parent 7d8809d commit 6ebb7b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

playground/src/components/Button.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ type RnnButtonProps = {
1818

1919
export default class RnnButton extends React.Component<RnnButtonProps> {
2020
render() {
21-
const { platform, ...props } = this.props;
21+
const { platform, onPress, ...props } = this.props;
2222
// If the platform prop is provided, only render if provided platform matches the current platform.
2323
if (platform && platform !== Platform.OS) {
2424
return null;
@@ -27,7 +27,7 @@ export default class RnnButton extends React.Component<RnnButtonProps> {
2727
const color = props.testID ? '#5B49F5' : '#65C888';
2828

2929
return (
30-
<TouchableOpacity>
30+
<TouchableOpacity onPress={onPress}>
3131
<View style={[styles.buttonContainer, { backgroundColor: color }]}>
3232
<Text style={styles.buttonText} {...props}>
3333
{props.label}

0 commit comments

Comments
 (0)