mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-22 06:06:40 +08:00
### What problem does this PR solve? Feat: Adjust the style of the note node #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
23 lines
525 B
TypeScript
23 lines
525 B
TypeScript
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 bg-card text-card-foreground',
|
|
className,
|
|
selected ? 'border-muted-foreground shadow-lg' : '',
|
|
'hover:ring-1',
|
|
)}
|
|
tabIndex={0}
|
|
{...props}
|
|
/>
|
|
));
|
|
|
|
BaseNode.displayName = 'BaseNode';
|