Feat: web app dark mode (#14732)
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
'use client'
|
||||
import type { FC } from 'react'
|
||||
import React from 'react'
|
||||
import { RiDownloadLine } from '@remixicon/react'
|
||||
import {
|
||||
useCSVDownloader,
|
||||
} from 'react-papaparse'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import cn from '@/utils/classnames'
|
||||
import { Download02 as DownloadIcon } from '@/app/components/base/icons/src/vender/solid/general'
|
||||
import ActionButton from '@/app/components/base/action-button'
|
||||
import Button from '@/app/components/base/button'
|
||||
import cn from '@/utils/classnames'
|
||||
|
||||
export type IResDownloadProps = {
|
||||
isMobile: boolean
|
||||
values: Record<string, string>[]
|
||||
@@ -31,10 +33,17 @@ const ResDownload: FC<IResDownloadProps> = ({
|
||||
}}
|
||||
data={values}
|
||||
>
|
||||
<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>
|
||||
{isMobile && (
|
||||
<ActionButton>
|
||||
<RiDownloadLine className='w-4 h-4' />
|
||||
</ActionButton>
|
||||
)}
|
||||
{!isMobile && (
|
||||
<Button className={cn('space-x-1')}>
|
||||
<RiDownloadLine className='w-4 h-4' />
|
||||
<span>{t('common.operation.download')}</span>
|
||||
</Button>
|
||||
)}
|
||||
</CSVDownloader>
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user