chore: n to 1 retrieval (#6839)
This commit is contained in:
parent
792f908afb
commit
9ae88ede12
11 changed files with 59 additions and 96 deletions
|
|
@ -12,6 +12,7 @@ type Props = {
|
|||
onChosen: () => void
|
||||
chosenConfig?: React.ReactNode
|
||||
icon?: JSX.Element
|
||||
extra?: React.ReactNode
|
||||
}
|
||||
|
||||
const RadioCard: FC<Props> = ({
|
||||
|
|
@ -20,20 +21,24 @@ const RadioCard: FC<Props> = ({
|
|||
isChosen,
|
||||
onChosen,
|
||||
icon,
|
||||
extra,
|
||||
}) => {
|
||||
return (
|
||||
<div
|
||||
className={cn(s.item, isChosen && s.active, 'flex')}
|
||||
className={cn(s.item, isChosen && s.active)}
|
||||
onClick={onChosen}
|
||||
>
|
||||
{icon}
|
||||
<div>
|
||||
<div className='flex justify-between items-center'>
|
||||
<div className='leading-5 text-sm font-medium text-gray-900'>{title}</div>
|
||||
<div className={s.radio}></div>
|
||||
<div className='flex px-3 py-2'>
|
||||
{icon}
|
||||
<div>
|
||||
<div className='flex justify-between items-center'>
|
||||
<div className='leading-5 text-sm font-medium text-gray-900'>{title}</div>
|
||||
<div className={s.radio}></div>
|
||||
</div>
|
||||
<div className='leading-[18px] text-xs font-normal text-gray-500'>{description}</div>
|
||||
</div>
|
||||
<div className='leading-[18px] text-xs font-normal text-gray-500'>{description}</div>
|
||||
</div>
|
||||
{extra}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
.item {
|
||||
@apply relative p-4 rounded-xl border border-gray-100 cursor-pointer;
|
||||
@apply relative rounded-xl border border-gray-100 cursor-pointer;
|
||||
background-color: #fcfcfd;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue