feat: support assistant frontend (#2139)

Co-authored-by: StyleZhang <jasonapring2015@outlook.com>
This commit is contained in:
Joel
2024-01-23 19:31:56 +08:00
committed by GitHub
parent e65a2a400d
commit 7bbe12b2bd
194 changed files with 8726 additions and 1586 deletions

View File

@@ -3,11 +3,13 @@ import type { FC } from 'react'
import React from 'react'
import { useTranslation } from 'react-i18next'
import { PlusIcon } from '@heroicons/react/20/solid'
import cn from 'classnames'
export type IOperationBtnProps = {
className?: string
type: 'add' | 'edit'
actionName?: string
onClick: () => void
onClick?: () => void
}
const iconMap = {
@@ -19,14 +21,15 @@ const iconMap = {
}
const OperationBtn: FC<IOperationBtnProps> = ({
className,
type,
actionName,
onClick,
onClick = () => { },
}) => {
const { t } = useTranslation()
return (
<div
className='flex items-center rounded-md h-7 px-3 space-x-1 text-gray-700 cursor-pointer hover:bg-gray-200'
className={cn(className, 'flex items-center rounded-md h-7 px-3 space-x-1 text-gray-700 cursor-pointer hover:bg-gray-200 select-none')}
onClick={onClick}>
<div>
{iconMap[type]}