dify/web/app/components/plugins/plugin-detail-panel/action-list.tsx

39 lines
1.5 KiB
TypeScript
Raw Normal View History

2024-10-12 16:29:46 +08:00
import React from 'react'
2024-10-12 17:08:45 +08:00
import { useTranslation } from 'react-i18next'
2024-10-13 10:49:55 +08:00
import Button from '@/app/components/base/button'
import Indicator from '@/app/components/header/indicator'
const ActionCard = () => {
return (
<div className='px-4 py-3 bg-components-panel-item-bg rounded-xl border-[0.5px] border-components-panel-border-subtle shadow-xs cursor-pointer hover:bg-components-panel-on-panel-item-bg-hover'>
<div className='pb-0.5 text-text-secondary system-md-semibold'>Notion Page Search</div>
<div className='text-text-tertiary system-xs-regular line-clamp-2'>A tool for performing a Google SERP search and extracting snippets and webpages.Input should be a search query.</div>
</div>
)
}
2024-10-12 16:29:46 +08:00
const ActionList = () => {
2024-10-12 17:08:45 +08:00
const { t } = useTranslation()
2024-10-12 16:29:46 +08:00
return (
2024-10-13 10:49:55 +08:00
<div className='px-4 pt-2 pb-4'>
<div className='mb-1 py-1'>
<div className='mb-1 h-6 flex items-center justify-between text-text-secondary system-sm-semibold-uppercase'>
{t('plugin.detailPanel.actionNum', { num: 3 })}
<Button variant='secondary' size='small'>
<Indicator className='mr-2' color={'green'} />
{t('tools.auth.authorized')}
</Button>
</div>
<Button variant='primary' className='w-full'>{t('tools.auth.unauthorized')}</Button>
</div>
<div className='flex flex-col gap-2'>
<ActionCard />
<ActionCard />
<ActionCard />
2024-10-12 17:08:45 +08:00
</div>
2024-10-12 16:29:46 +08:00
</div>
)
}
export default ActionList