File size: 805 Bytes
36669dc 64b1da0 36669dc db19895 36669dc 64b1da0 36669dc 1157a9f 36669dc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
import { Handle, Position } from 'reactflow';
// import { v4 as uuid } from 'uuid';
import styles from './index.less';
const DEFAULT_HANDLE_STYLE = {
width: 6,
height: 6,
bottom: -5,
fontSize: 8,
};
interface IProps {
top: number;
right: number;
text: string;
idx?: number;
}
const CategorizeHandle = ({ top, right, text, idx }: IProps) => {
return (
<Handle
type="source"
position={Position.Right}
// id={`CategorizeHandle${idx}`}
id={text}
isConnectable
style={{
...DEFAULT_HANDLE_STYLE,
top: `${top}%`,
right: `${right}%`,
background: 'red',
color: 'black',
}}
>
<span className={styles.categorizeAnchorPointText}>{text}</span>
</Handle>
);
};
export default CategorizeHandle;
|