Files
shop-admin/src/components/Radio.tsx
T
2025-10-19 16:04:28 +03:30

20 lines
537 B
TypeScript

import { type FC } from 'react'
type Props = {
isActive: boolean,
value: string | boolean,
onChange: (value: string | boolean) => void
}
const Radio: FC<Props> = (props: Props) => {
return (
<div onClick={() => props.onChange(props.value)} className='size-4 cursor-pointer rounded-full bg-[#EAEDF5] flex justify-center items-center'>
{
props.isActive &&
<div className='size-2 bg-primary rounded-full'></div>
}
</div>
)
}
export default Radio