Skip to content
This repository was archived by the owner on Mar 1, 2024. It is now read-only.

Commit 5805832

Browse files
committed
fix(Button): fix missing onClick and to props
1 parent 34f95b2 commit 5805832

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/Button/Button.react.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ type PropsForAll = {|
2424
+to?: string,
2525
+isOption?: boolean,
2626
+rootRef?: (?HTMLElement) => void,
27+
+onClick?: (event: SyntheticMouseEvent<HTMLElement>) => mixed,
2728
|};
2829

2930
type DefaultButtonComponent = {|
@@ -70,6 +71,8 @@ const Button = (props: Props): React.Node => {
7071
isDropdownToggle,
7172
isOption,
7273
rootRef,
74+
to,
75+
onClick,
7376
} = props;
7477

7578
const classes = cn(
@@ -148,8 +151,6 @@ const Button = (props: Props): React.Node => {
148151
</a>
149152
);
150153
} else {
151-
const { onClick, to } = props;
152-
153154
const Component: React.ElementType = props.RootComponent;
154155

155156
return (

0 commit comments

Comments
 (0)