Feat: Add canvas node toolbar #3221 (#8249)

### 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:
balibabu
2025-06-13 16:52:52 +08:00
committed by GitHub
parent 64af09ce7b
commit 6b58b67d12
9 changed files with 331 additions and 206 deletions

View 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';