controls.tsx 574 B

123456789101112131415161718
  1. 'use client';
  2. import { cn } from '@/lib/utils';
  3. import { Controls as ControlsPrimitive } from '@xyflow/react';
  4. import type { ComponentProps } from 'react';
  5. export type ControlsProps = ComponentProps<typeof ControlsPrimitive>;
  6. export const Controls = ({ className, ...props }: ControlsProps) => (
  7. <ControlsPrimitive
  8. className={cn(
  9. 'gap-px overflow-hidden rounded-md border bg-card p-1 shadow-none!',
  10. '[&>button]:rounded-md [&>button]:border-none! [&>button]:bg-transparent! [&>button]:hover:bg-secondary!',
  11. className,
  12. )}
  13. {...props}
  14. />
  15. );