Skip to content

Commit

Permalink
fix(16059): updates RadioButton and RadioButtonGroup proptypes (#16186)
Browse files Browse the repository at this point in the history
* fix(16059): updated props for RadioButton, RadioButtonGroup

* fix(16059): selection type of RadioButtonGroup

* fix(16059): type updated for onChange
  • Loading branch information
2nikhiltom authored Apr 15, 2024
1 parent df51fc5 commit 046ae78
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/react/src/components/RadioButton/RadioButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export interface RadioButtonProps
onChange?: (
value: string | number,
name: string | undefined,
event: any
event: React.ChangeEvent<HTMLInputElement>
) => void;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,11 @@ export interface RadioButtonGroupProps
* Provide an optional `onChange` hook that is called whenever the value of
* the group changes
*/
onChange?: (selection: unknown, name: string, evt: unknown) => void;

onChange?: (
selection: React.ReactNode,
name: string,
event: React.ChangeEvent<HTMLInputElement>
) => void;
/**
* Provide where radio buttons should be placed
*/
Expand Down

0 comments on commit 046ae78

Please sign in to comment.