add button
This commit is contained in:
1 parent
13c9ede31c
commit
844145aeaf
3 files changed
+59
No files matched your search
@@ -0,0 +1,24 @@
|
||||
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>
|
||||
</>
|
||||
}
|
||||
Reference in new issue
Block a user