Skip to content

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

827 B
Raw Blame
import { cva, type VariantProps } from 'class-variance-authority';
import React from 'react';

import { cn } from '@/lib/utils';

const dotVariants = cva('size-2 rounded-full', {
  variants: {
    variant: {
      destructive: 'bg-danger-10',
      primary: 'bg-accent-10',
    },
  },
  defaultVariants: {},
});

interface DotProps
  extends VariantProps<typeof dotVariants>,
    React.HTMLAttributes<HTMLDivElement> {
  animation?: boolean;
}

const Dot = React.forwardRef<HTMLDivElement, DotProps>(
  ({ className, animation = false, variant, ...props }, ref) => {
    return (
      <div
        ref={ref}
        className={cn(
          dotVariants({ variant }),
          animation && 'animate-pulse',
          className,
        )}
        {...props}
      />
    );
  },
);

Dot.displayName = 'Dot';

export { Dot };