2024-01-23 19:31:56 +08:00
|
|
|
'use client'
|
|
|
|
import type { FC } from 'react'
|
|
|
|
import React from 'react'
|
2024-07-09 15:05:40 +08:00
|
|
|
import cn from '@/utils/classnames'
|
2024-01-23 19:31:56 +08:00
|
|
|
|
|
|
|
type Props = {
|
|
|
|
isChecked: boolean
|
2025-07-29 15:37:16 +08:00
|
|
|
className?: string
|
2024-01-23 19:31:56 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
const RadioUI: FC<Props> = ({
|
|
|
|
isChecked,
|
2025-07-29 15:37:16 +08:00
|
|
|
className,
|
2024-01-23 19:31:56 +08:00
|
|
|
}) => {
|
|
|
|
return (
|
2025-07-29 15:37:16 +08:00
|
|
|
<div
|
|
|
|
className={cn(
|
|
|
|
isChecked ? 'border-[5px] border-components-radio-border-checked' : 'border-[2px] border-components-radio-border',
|
|
|
|
'h-4 w-4 rounded-full',
|
|
|
|
className,
|
|
|
|
)}
|
|
|
|
>
|
2024-01-23 19:31:56 +08:00
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
export default React.memo(RadioUI)
|