Files
PrivyDrop/frontend/components/Editor/EditorToolbar/InsertTools.tsx
T
david_bai 7e781631bb chore(ui): clear remaining frontend warnings
Resolve the remaining lint warnings without changing behavior by fixing hook dependency lists, removing the icon naming false positive, and switching the YouTube thumbnail to next/image for compliant rendering.
2026-03-27 17:20:49 +08:00

40 lines
924 B
TypeScript

import { Link2, Image as ImageIcon, Code } from "lucide-react";
interface InsertToolsProps {
insertLink: () => void;
insertImage: () => void;
insertCodeBlock: () => void;
}
export function InsertTools({
insertLink,
insertImage,
insertCodeBlock,
}: InsertToolsProps) {
return (
<div className="flex flex-wrap gap-1">
<button
className="p-1.5 hover:bg-accent rounded"
onClick={insertLink}
title="Insert url"
>
<Link2 className="w-3.5 h-3.5" />
</button>
<button
className="p-1.5 hover:bg-accent rounded"
onClick={insertImage}
title="Upload image"
>
<ImageIcon className="w-3.5 h-3.5" />
</button>
<button
className="p-1.5 hover:bg-accent rounded"
onClick={insertCodeBlock}
title="Insert code"
>
<Code className="w-3.5 h-3.5" />
</button>
</div>
);
}