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

@@ -105,7 +105,8 @@ const Sidebar: FC<ISidebarProps> = ({
<div className="flex flex-shrink-0 p-4 !pb-0">
<Button
onClick={() => onStartChat({})}
className="flex group w-full flex-shrink-0 !justify-start !h-9 text-primary-600 items-center text-sm">
variant='secondary-accent'
className="group w-full flex-shrink-0 justify-start">
<PencilSquareIcon className="mr-2 h-4 w-4" /> {t('share.chat.newChat')}
</Button>
</div>

View File

@@ -60,14 +60,12 @@ export const VarOpBtnGroup: FC<{ className?: string; onConfirm: () => void; onCa
return (
<div className={cn(className, 'flex mt-3 space-x-2 mobile:ml-0 tablet:ml-[128px] text-sm')}>
<Button
className='text-sm'
variant='primary'
onClick={onConfirm}
>
{t('common.operation.save')}
</Button>
<Button
className='text-sm'
onClick={onCancel}
>
{t('common.operation.cancel')}

View File

@@ -45,7 +45,7 @@ export const ChatBtn: FC<{ onClick: () => void; className?: string }> = ({
return (
<Button
variant='primary'
className={cn(className, `px-4 inline-flex items-center ${s.customBtn} gap-2`)}
className={cn(className, `px-4 ${s.customBtn} gap-2`)}
onClick={onClick}>
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fillRule="evenodd" clipRule="evenodd" d="M18 10.5C18 14.366 14.418 17.5 10 17.5C8.58005 17.506 7.17955 17.1698 5.917 16.52L2 17.5L3.338 14.377C2.493 13.267 2 11.934 2 10.5C2 6.634 5.582 3.5 10 3.5C14.418 3.5 18 6.634 18 10.5ZM7 9.5H5V11.5H7V9.5ZM15 9.5H13V11.5H15V9.5ZM9 9.5H11V11.5H9V9.5Z" fill="white" />

View File

@@ -92,7 +92,8 @@ const Sidebar: FC<ISidebarProps> = ({
<div className="flex flex-shrink-0 p-4 !pb-0">
<Button
onClick={() => { onCurrentIdChange('-1') }}
className="group flex w-full flex-shrink-0 !justify-start !h-9 text-primary-600 items-center text-sm">
variant='secondary-accent'
className="group w-full flex-shrink-0">
<PencilSquareIcon className="mr-2 h-4 w-4" /> {t('share.chat.newChat')}
</Button>
</div>

View File

@@ -60,14 +60,12 @@ export const VarOpBtnGroup: FC<{ className?: string; onConfirm: () => void; onCa
return (
<div className={cn(className, 'flex mt-3 space-x-2 mobile:ml-0 tablet:ml-[128px] text-sm')}>
<Button
className='text-sm'
variant='primary'
onClick={onConfirm}
>
{t('common.operation.save')}
</Button>
<Button
className='text-sm'
onClick={onCancel}
>
{t('common.operation.cancel')}

View File

@@ -482,7 +482,7 @@ const TextGeneration: FC<IMainProps> = ({
<div className='ml-1 text-[#D92D20]'>{t('share.generation.batchFailed.info', { num: allFailedTaskList.length })}</div>
<Button
variant='primary'
className='ml-2 !h-8 !px-3'
className='ml-2'
onClick={handleRetryAllFailedTask}
>{t('share.generation.batchFailed.retry')}</Button>
<div className='mx-3 w-[1px] h-3.5 bg-gray-200'></div>
@@ -545,7 +545,7 @@ const TextGeneration: FC<IMainProps> = ({
</div>
{!isPC && (
<Button
className='shrink-0 !h-8 !px-3 ml-2'
className='shrink-0 ml-2'
onClick={showResSidebar}
>
<div className='flex items-center space-x-2 text-primary-600 text-[13px] font-medium'>

View File

@@ -28,7 +28,7 @@ const Header: FC<IResultHeaderProps> = ({
<div className='text-gray-800 text-2xl leading-4 font-normal'>{t('share.generation.resultTitle')}</div>
<div className='flex items-center space-x-2'>
<Button
className='flex items-center !h-7 !p-[2px] !pr-2'
className='h-7 p-[2px] pr-2'
onClick={() => {
copy(result)
Toast.notify({ type: 'success', message: 'copied' })

View File

@@ -45,7 +45,7 @@ const RunBatch: FC<IRunBatchProps> = ({
<div className='flex justify-end'>
<Button
variant="primary"
className='mt-4 !h-8 !pl-3 !pr-4'
className='mt-4 pl-3 pr-4'
onClick={handleSend}
disabled={!isParsed || !isAllFinished}
>

View File

@@ -31,7 +31,7 @@ const ResDownload: FC<IResDownloadProps> = ({
}}
data={values}
>
<Button className={cn('flex items-center !h-8 space-x-2 bg-white !text-[13px] font-medium', isMobile ? '!p-0 !w-8 justify-center' : '!px-3')}>
<Button className={cn('space-x-2 bg-white', isMobile ? '!p-0 !w-8 justify-center' : '')}>
<DownloadIcon className='w-4 h-4 text-[#155EEF]' />
{!isMobile && <span className='text-[#155EEF]'>{t('common.operation.download')}</span>}
</Button>

View File

@@ -118,7 +118,6 @@ const RunOnce: FC<IRunOnceProps> = ({
<div className='w-full mt-4'>
<div className="flex items-center justify-between">
<Button
className='!h-8 !p-3'
onClick={onClear}
disabled={false}
>
@@ -126,7 +125,6 @@ const RunOnce: FC<IRunOnceProps> = ({
</Button>
<Button
variant="primary"
className='!h-8 !pl-3 !pr-4'
onClick={onSend}
disabled={false}
>