'use client' import type { FC } from 'react' import React from 'react' import cn from '@/utils/classnames' type Props = { className?: string icon: React.ReactNode iconBgClassName?: string title: React.ReactNode description: string noRadio?: boolean isChosen?: boolean onChosen?: () => void chosenConfig?: React.ReactNode chosenConfigWrapClassName?: string } const RadioCard: FC = ({ icon, iconBgClassName = 'bg-[#F5F3FF]', title, description, noRadio, isChosen, onChosen = () => { }, chosenConfig, chosenConfigWrapClassName, }) => { return (
{icon}
{title}
{description}
{!noRadio && (
)}
{((isChosen && chosenConfig) || noRadio) && (
{chosenConfig}
)}
) } export default React.memo(RadioCard)