Skip to content

Commit

Permalink
feat(radio): add typescript support for accepting ract node (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
bbleungg committed Mar 27, 2024
1 parent 2d8b3b1 commit 838d1cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/radio/Radio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export type RadioProps = {
/**
* The actual text to be displayed `Cats For Adoptions`
*/
label: string;
label: string | ReactNode;
/**
* Additional functionality after the select
*/
Expand Down Expand Up @@ -104,7 +104,7 @@ function Radio(props: RadioProps) {
};

const radioChildren = children
? React.Children.map(props.children, (child) =>
? React.Children.map(props.children, child =>
isValidElement(child)
? React.cloneElement(child as ReactElement<any>, { isDisabled })
: child
Expand Down

0 comments on commit 838d1cb

Please sign in to comment.