Skip to content

Commit

Permalink
fix: Children props types
Browse files Browse the repository at this point in the history
  • Loading branch information
acasazza committed May 3, 2022
1 parent 94e88ef commit 60e9b46
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/components/PaymentMethodRadioButton.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
import React, {
useContext,
FunctionComponent,
ReactNode,
ChangeEvent,
} from 'react'
import { useContext, FunctionComponent, ReactNode, ChangeEvent } from 'react'
import PaymentMethodChildrenContext from '#context/PaymentMethodChildrenContext'
import Parent from './utils/Parent'
import components from '#config/components'
Expand All @@ -18,7 +13,10 @@ const displayName = components.PaymentMethodRadioButton.displayName
type ShippingMethodRadioButtonChildrenProps = Omit<
ShippingMethodRadioButtonProps,
'children'
> & { checked: boolean }
> & {
checked: boolean
handleOnChange: (event: ChangeEvent<HTMLInputElement>) => Promise<void>
}

type ShippingMethodRadioButtonProps = {
children?: (props: ShippingMethodRadioButtonChildrenProps) => ReactNode
Expand Down Expand Up @@ -59,6 +57,7 @@ const PaymentMethodRadioButton: FunctionComponent<
<Parent {...parentProps}>{props.children}</Parent>
) : (
<input
title={name}
type="radio"
id={id}
onChange={handleOnChange}
Expand Down

0 comments on commit 60e9b46

Please sign in to comment.