Skip to content

Open-source and local-first Slack and Notion alternative that puts you in control of your data

548 B
Raw Blame
import { cn } from '@colanode/ui/lib/utils';

interface MarkButtonProps {
  isActive: boolean;
  onClick: () => void;
  icon: React.ComponentType<{ className?: string }>;
}

export const MarkButton = ({
  isActive,
  onClick,
  icon: Icon,
}: MarkButtonProps) => {
  return (
    <button
      type="button"
      className={cn(
        'flex h-8 w-8 items-center justify-center rounded-md cursor-pointer hover:bg-input',
        isActive && 'bg-input'
      )}
      onClick={onClick}
    >
      <Icon className="size-4" />
    </button>
  );
};