import type React from "react"; import type { ReactNode } from "react"; import { Trash2 } from "lucide-react"; interface DyadDeleteProps { children?: ReactNode; node?: any; path?: string; } export const DyadDelete: React.FC = ({ children, node, path: pathProp, }) => { // Use props directly if provided, otherwise extract from node const path = pathProp || node?.properties?.path || ""; // Extract filename from path const fileName = path ? path.split("/").pop() : ""; return (
{fileName && ( {fileName} )}
Delete
{path && (
{path}
)}
{children}
); };