wwf
3 天以前 a430284aa21e3ae1f0d5654e55b2ad2852519cc2
app/components/base/radio/component/radio/index.tsx
@@ -1,4 +1,4 @@
import type { ReactNode } from 'react'
import type { ReactElement } from 'react'
import { useId } from 'react'
import { useContext } from 'use-context-selector'
import RadioGroupContext from '../../context'
@@ -8,7 +8,7 @@
export type IRadioProps = {
  className?: string
  labelClassName?: string
  children?: string | ReactNode
  children?: string | ReactElement
  checked?: boolean
  value?: string | number
  disabled?: boolean
@@ -23,7 +23,7 @@
  value,
  disabled,
  onChange,
}: IRadioProps): React.JSX.Element {
}: IRadioProps): JSX.Element {
  const groupContext = useContext(RadioGroupContext)
  const labelId = useId()
  const handleChange = (e: IRadioProps['value']) => {
@@ -51,7 +51,7 @@
    >
      {children && (
        <label className={
          cn(labelClassName, 'cursor-pointer text-sm')
          cn(labelClassName, 'text-sm cursor-pointer')
        }
        id={labelId}
        >