refactor: refactor the button component using forwardRef (#4379)
Co-authored-by: KVOJJJin <jzongcode@gmail.com>
This commit is contained in:
parent
bb33ffc332
commit
a3bd5eba02
100 changed files with 218 additions and 224 deletions
|
|
@ -49,34 +49,34 @@ const InvitedModal = ({
|
|||
<div className='flex flex-col gap-2 mb-9'>
|
||||
{
|
||||
!!successInvationResults.length
|
||||
&& <>
|
||||
<div className='py-2 text-sm font-Medium text-gray-900'>{t('common.members.invitationLink')}</div>
|
||||
{successInvationResults.map(item =>
|
||||
<InvitationLink key={item.email} value={item} />)}
|
||||
</>
|
||||
&& <>
|
||||
<div className='py-2 text-sm font-Medium text-gray-900'>{t('common.members.invitationLink')}</div>
|
||||
{successInvationResults.map(item =>
|
||||
<InvitationLink key={item.email} value={item} />)}
|
||||
</>
|
||||
}
|
||||
{
|
||||
!!failedInvationResults.length
|
||||
&& <>
|
||||
<div className='py-2 text-sm font-Medium text-gray-900'>{t('common.members.failedinvitationEmails')}</div>
|
||||
<div className='flex flex-wrap justify-between gap-y-1'>
|
||||
{
|
||||
failedInvationResults.map(item =>
|
||||
<div key={item.email} className='flex justify-center border border-red-300 rounded-md px-1 bg-orange-50'>
|
||||
<Tooltip
|
||||
selector={`invitation-tag-${item.email}`}
|
||||
htmlContent={item.message}
|
||||
>
|
||||
<div className='flex justify-center items-center text-sm gap-1'>
|
||||
{item.email}
|
||||
<QuestionMarkCircleIcon className='w-4 h-4 text-red-300' />
|
||||
</div>
|
||||
</Tooltip>
|
||||
</div>,
|
||||
)
|
||||
}
|
||||
</div>
|
||||
</>
|
||||
&& <>
|
||||
<div className='py-2 text-sm font-Medium text-gray-900'>{t('common.members.failedinvitationEmails')}</div>
|
||||
<div className='flex flex-wrap justify-between gap-y-1'>
|
||||
{
|
||||
failedInvationResults.map(item =>
|
||||
<div key={item.email} className='flex justify-center border border-red-300 rounded-md px-1 bg-orange-50'>
|
||||
<Tooltip
|
||||
selector={`invitation-tag-${item.email}`}
|
||||
htmlContent={item.message}
|
||||
>
|
||||
<div className='flex justify-center items-center text-sm gap-1'>
|
||||
{item.email}
|
||||
<QuestionMarkCircleIcon className='w-4 h-4 text-red-300' />
|
||||
</div>
|
||||
</Tooltip>
|
||||
</div>,
|
||||
)
|
||||
}
|
||||
</div>
|
||||
</>
|
||||
}
|
||||
</div>
|
||||
</>
|
||||
|
|
@ -85,7 +85,7 @@ const InvitedModal = ({
|
|||
<Button
|
||||
className='w-[96px] text-sm font-medium'
|
||||
onClick={onCancel}
|
||||
type='primary'
|
||||
variant='primary'
|
||||
>
|
||||
{t('common.members.ok')}
|
||||
</Button>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue