continue-custom/gui/src/components/StepContainer/StepContainerPreToolbar/InsertButton.tsx
2025-04-11 17:42:55 -07:00

25 lines
763 B
TypeScript

import { ArrowLeftEndOnRectangleIcon } from "@heroicons/react/24/outline";
import { lightGray } from "../..";
/**
* Button that inserts code at the current cursor position
*/
interface InsertButtonProps {
onInsert: () => void;
}
export default function InsertButton({ onInsert }: InsertButtonProps) {
return (
<div
className={`flex cursor-pointer items-center border-none bg-transparent text-xs outline-none hover:brightness-125`}
onClick={onInsert}
>
<div
className="max-2xs:hidden flex items-center gap-1 transition-colors duration-200 hover:brightness-125"
style={{ color: lightGray }}
>
<ArrowLeftEndOnRectangleIcon className="h-3.5 w-3.5 hover:brightness-125" />
</div>
</div>
);
}