Skip to content

Commit 26c331b

Browse files
authored
Merge pull request #37 from coreplane/fix-onpress-type
TypeScript fix for AwesomeButtonProps.onPress
2 parents ead1c27 + 11de124 commit 26c331b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

index.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ declare module "react-native-really-awesome-button" {
77
import React, { Component } from "react";
88
import { ViewStyle } from "react-native";
99

10+
type AfterPressFn = (callback: () => void) => void;
11+
1012
export interface AwesomeButtonProps {
1113
activityColor?: string;
1214
backgroundActive?: string;
@@ -39,7 +41,7 @@ declare module "react-native-really-awesome-button" {
3941
textSize?: number;
4042
textFamily?: string;
4143
width?: number;
42-
onPress?(): void;
44+
onPress?: (afterPressFn?: AfterPressFn) => void;
4345
}
4446

4547
export default class AwesomeButton extends Component<

0 commit comments

Comments
 (0)