mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-22 06:06:40 +08:00
### What problem does this PR solve? Feat: Add canvas node toolbar #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
22
web/src/components/xyflow/base-node.tsx
Normal file
22
web/src/components/xyflow/base-node.tsx
Normal file
@ -0,0 +1,22 @@
|
||||
import { forwardRef, HTMLAttributes } from 'react';
|
||||
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
export const BaseNode = forwardRef<
|
||||
HTMLDivElement,
|
||||
HTMLAttributes<HTMLDivElement> & { selected?: boolean }
|
||||
>(({ className, selected, ...props }, ref) => (
|
||||
<div
|
||||
ref={ref}
|
||||
className={cn(
|
||||
'relative rounded-md border bg-card text-card-foreground',
|
||||
className,
|
||||
selected ? 'border-muted-foreground shadow-lg' : '',
|
||||
'hover:ring-1',
|
||||
)}
|
||||
tabIndex={0}
|
||||
{...props}
|
||||
/>
|
||||
));
|
||||
|
||||
BaseNode.displayName = 'BaseNode';
|
||||
Reference in New Issue
Block a user