2025-06-16 09:29:08 +08:00
|
|
|
import { cn } from '@/lib/utils';
|
2025-07-18 19:26:24 +08:00
|
|
|
import { HTMLAttributes } from 'react';
|
2025-06-16 09:29:08 +08:00
|
|
|
|
2025-07-18 19:26:24 +08:00
|
|
|
type IProps = HTMLAttributes<HTMLDivElement> & { selected?: boolean };
|
|
|
|
|
|
|
|
|
|
export function NodeWrapper({ children, className, selected }: IProps) {
|
2025-06-16 09:29:08 +08:00
|
|
|
return (
|
|
|
|
|
<section
|
|
|
|
|
className={cn(
|
2025-07-24 11:20:00 +08:00
|
|
|
'bg-text-title-invert p-2.5 rounded-md w-[200px] text-xs',
|
2025-07-18 19:26:24 +08:00
|
|
|
{ 'border border-background-checked': selected },
|
2025-06-16 09:29:08 +08:00
|
|
|
className,
|
|
|
|
|
)}
|
|
|
|
|
>
|
|
|
|
|
{children}
|
|
|
|
|
</section>
|
|
|
|
|
);
|
|
|
|
|
}
|