fix: button (#5470)

This commit is contained in:
zxhlyh
2024-06-21 14:17:45 +08:00
committed by GitHub
parent 92ddb410cd
commit 5d4d65a85b
112 changed files with 638 additions and 256 deletions

View File

@@ -201,7 +201,8 @@ const WorkflowToolConfigureButton = ({
<div className='px-2.5 py-2 border-t-[0.5px] border-black/5'>
<div className='flex justify-between'>
<Button
className='px-2 w-[140px] py-0 h-6 shadow-xs rounded-md text-xs font-medium text-gray-700 border-[0.5px] bg-white border-gray-200'
size='small'
className='w-[140px]'
onClick={() => setShowModal(true)}
disabled={!isCurrentWorkspaceManager}
>
@@ -209,7 +210,8 @@ const WorkflowToolConfigureButton = ({
{outdated && <Indicator className='ml-1' color={'yellow'} />}
</Button>
<Button
className='px-2 w-[140px] py-0 h-6 shadow-xs rounded-md text-xs font-medium text-gray-700 border-[0.5px] bg-white border-gray-200'
size='small'
className='w-[140px]'
onClick={() => router.push('/tools?category=workflow')}
>
{t('workflow.common.manageInTools')}

View File

@@ -35,8 +35,8 @@ const ConfirmModal = ({ show, onConfirm, onClose }: ConfirmModalProps) => {
</div>
<div className='pt-6 flex justify-end items-center'>
<div className='flex items-center'>
<Button className='mr-2 text-gray-700 text-sm font-medium' onClick={onClose}>{t('common.operation.cancel')}</Button>
<Button className='text-sm font-medium border-red-700 border-[0.5px]' variant="warning" onClick={onConfirm}>{t('common.operation.confirm')}</Button>
<Button className='mr-2' onClick={onClose}>{t('common.operation.cancel')}</Button>
<Button className='border-red-700' variant="warning" onClick={onConfirm}>{t('common.operation.confirm')}</Button>
</div>
</div>
</Modal>

View File

@@ -244,11 +244,11 @@ const WorkflowToolAsModal: FC<Props> = ({
</div>
<div className={cn((!isAdd && onRemove) ? 'justify-between' : 'justify-end', 'mt-2 shrink-0 flex py-4 px-6 rounded-b-[10px] bg-gray-50 border-t border-black/5')} >
{!isAdd && onRemove && (
<Button className='flex items-center h-8 !px-3 !text-[13px] font-medium !text-gray-700' onClick={onRemove}>{t('common.operation.remove')}</Button>
<Button onClick={onRemove}>{t('common.operation.remove')}</Button>
)}
<div className='flex space-x-2 '>
<Button className='flex items-center h-8 !px-3 !text-[13px] font-medium !text-gray-700' onClick={onHide}>{t('common.operation.cancel')}</Button>
<Button disabled={!label || !name || !isNameValid(name)} className='flex items-center h-8 !px-3 !text-[13px] font-medium' variant='primary' onClick={() => {
<Button onClick={onHide}>{t('common.operation.cancel')}</Button>
<Button disabled={!label || !name || !isNameValid(name)} variant='primary' onClick={() => {
if (isAdd)
onConfirm()
else