7e781631bb
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.
40 lines
924 B
TypeScript
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>
|
|
);
|
|
}
|