toolbar.tsx 424 B

12345678910111213
  1. import { cn } from '@/lib/utils';
  2. import { NodeToolbar, Position } from '@xyflow/react';
  3. import type { ComponentProps } from 'react';
  4. type ToolbarProps = ComponentProps<typeof NodeToolbar>;
  5. export const Toolbar = ({ className, ...props }: ToolbarProps) => (
  6. <NodeToolbar
  7. className={cn('flex items-center gap-1 rounded-sm border bg-background p-1.5', className)}
  8. position={Position.Bottom}
  9. {...props}
  10. />
  11. );