Skip to content

Commit

Permalink
updating inputRef typing on Button component (#1553)
Browse files Browse the repository at this point in the history
  • Loading branch information
scheul93 committed Jan 26, 2022
1 parent 689e4c4 commit b469afb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/design-system/src/components/Button/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { RefObject } from 'react';
import classNames from 'classnames';

export type ButtonComponentType = React.ElementType<any> | React.ComponentType<any>;
Expand All @@ -9,6 +9,8 @@ export type ButtonSize = 'small' | 'big';
*/
export type ButtonVariation = 'primary' | 'danger' | 'success' | 'transparent';

export type ButtonRef = RefObject<any> | ((...args: any[]) => any);

type CommonButtonProps = {
/**
* Label text or HTML
Expand All @@ -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
*/
Expand Down

0 comments on commit b469afb

Please sign in to comment.