Files
Shortumation/webapp/src/components/DAGSvgs/AddButton.tsx
T
2021-11-25 14:03:15 -05:00

25 lines
483 B
TypeScript

import "./AddButton.css";
import { Point } from "types/graphs";
import { AddIcon } from '../Icons/index';
export interface AddProps {
onClick?: () => void;
loc: Point,
height: number,
width: number,
}
export const AddButton = ({
loc: [x, y],
height,
width,
onClick = () => { },
}: AddProps) => {
return <>
<foreignObject className="dag-svg--add-btn" x={x} y={y} width={width} height={height}>
<AddIcon onClick={onClick} />
</foreignObject>
</>
}