Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
nickamantia committed Sep 4, 2024
1 parent e817ce3 commit 3adc0a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions playbook/app/pb_kits/playbook/pb_radio/_radio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const Radio = ({
value = 'radio_text',
onChange = () => { void 0 },
...props
}: RadioProps ) => {
}: RadioProps, ref: any ) => {
const radioRef = useRef(null);

const ariaProps = buildAriaProps(aria);
Expand All @@ -66,7 +66,7 @@ const Radio = ({

const displayRadio = (props: RadioProps & any) => {
if (isValidElement(children) && children.type === 'input') {
return React.cloneElement(children, { ...props, ref: radioRef });
return children;
} else if (isCustomChild || !children) {
return (
<input
Expand Down

0 comments on commit 3adc0a3

Please sign in to comment.