From b469afbb35aba98bc36f72097928f540b255c047 Mon Sep 17 00:00:00 2001 From: Anna Scheuler Kammeyer <33579665+scheul93@users.noreply.github.com> Date: Wed, 26 Jan 2022 15:46:52 -0700 Subject: [PATCH] updating inputRef typing on Button component (#1553) --- packages/design-system/src/components/Button/Button.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/design-system/src/components/Button/Button.tsx b/packages/design-system/src/components/Button/Button.tsx index ec6331e4a2..6982f7406c 100644 --- a/packages/design-system/src/components/Button/Button.tsx +++ b/packages/design-system/src/components/Button/Button.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { RefObject } from 'react'; import classNames from 'classnames'; export type ButtonComponentType = React.ElementType | React.ComponentType; @@ -9,6 +9,8 @@ export type ButtonSize = 'small' | 'big'; */ export type ButtonVariation = 'primary' | 'danger' | 'success' | 'transparent'; +export type ButtonRef = RefObject | ((...args: any[]) => any); + type CommonButtonProps = { /** * Label text or HTML @@ -34,7 +36,7 @@ type CommonButtonProps = { /** * Access a reference to the `button` or `a` element */ - inputRef?: (...args: any[]) => any; + inputRef?: ButtonRef; /** * @hide-prop [Deprecated] Use inversed instead */