added types for baseEdge

This commit is contained in:
peterkogo
2024-01-15 18:03:22 +01:00
parent 0f8e13e0cf
commit 115ae9493a
2 changed files with 20 additions and 0 deletions
+11
View File
@@ -114,13 +114,24 @@ export type EdgeProps<T = any> = Pick<
* @public
*/
export type BaseEdgeProps = EdgeLabelOptions & {
/** unique id of edge */
id?: string;
/** additional padding where interacting with an edge is still possible */
interactionWidth?: number;
className?: string;
/** x position of edge label */
labelX?: number;
/** y position of edge label */
labelY?: number;
/** marker at start of edge
* @example 'url(#arrow)'
*/
markerStart?: string;
/** marker at end of edge
* @example 'url(#arrow)'
*/
markerEnd?: string;
/** svg path of the edge */
path: string;
style?: CSSProperties;
};
@@ -5,10 +5,19 @@ export type BaseEdgeProps = Pick<
'interactionWidth' | 'label' | 'labelStyle' | 'style'
> & {
id?: string;
/** svg path of the edge */
path: string;
/** x coordinate of the label */
labelX?: number;
/** y coordinate of the label */
labelY?: number;
/** marker at start of edge
* @example 'url(#arrow)'
*/
markerStart?: string;
/** marker at end of edge
* @example 'url(#arrow)'
*/
markerEnd?: string;
class?: string;
};