Skip to content

Commit 0cb365e

Browse files
authored
Merge pull request #53 from codegouvfr:feature/button-onClick-optional
Button onClick can be optional
2 parents 3879633 + e83985b commit 0cb365e

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)