Skip to content

Commit e83985b

Browse files
committed
Button onClick can be optional
1 parent 710932f commit e83985b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export namespace ButtonProps {
6060
};
6161
export type AsButton = {
6262
linkProps?: never;
63-
onClick: React.MouseEventHandler<HTMLButtonElement>;
63+
onClick?: React.MouseEventHandler<HTMLButtonElement>;
6464
nativeButtonProps?: Omit<
6565
React.DetailedHTMLProps<
6666
React.ButtonHTMLAttributes<HTMLButtonElement>,

0 commit comments

Comments
 (0)