wwf
2 天以前 a430284aa21e3ae1f0d5654e55b2ad2852519cc2
app/components/workflow/nodes/_base/components/remove-button.tsx
@@ -2,7 +2,7 @@
import type { FC } from 'react'
import React from 'react'
import { RiDeleteBinLine } from '@remixicon/react'
import ActionButton from '@/app/components/base/action-button'
import cn from '@/utils/classnames'
type Props = {
  className?: string
@@ -10,12 +10,16 @@
}
const Remove: FC<Props> = ({
  className,
  onClick,
}) => {
  return (
    <ActionButton size='l' className='group shrink-0 hover:!bg-state-destructive-hover' onClick={onClick}>
      <RiDeleteBinLine className='h-4 w-4 text-text-tertiary group-hover:text-text-destructive' />
    </ActionButton>
    <div
      className={cn(className, 'p-1 cursor-pointer rounded-md hover:bg-black/5 text-gray-500 hover:text-gray-800')}
      onClick={onClick}
    >
      <RiDeleteBinLine className='w-4 h-4' />
    </div>
  )
}
export default React.memo(Remove)