From 144878f7b055cdeaab2665e2cb75c7fddaf36231 Mon Sep 17 00:00:00 2001 From: martinalong Date: Fri, 2 Dec 2022 12:27:00 -0800 Subject: [PATCH] add type definitions for focus and blur callback --- src/types/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types/index.ts b/src/types/index.ts index 1c81901..db9b5f2 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -16,12 +16,12 @@ export interface ElementProps { /** * Triggered when the Element loses focus. */ - onBlur?: () => any; + onBlur?: (event: {elementType: stripeJs.StripeElementType}) => any; /** * Triggered when the Element receives focus. */ - onFocus?: () => any; + onFocus?: (event: {elementType: stripeJs.StripeElementType}) => any; } export interface AuBankAccountElementProps extends ElementProps {