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 * @public
*/ */
export type BaseEdgeProps = EdgeLabelOptions & { export type BaseEdgeProps = EdgeLabelOptions & {
/** unique id of edge */
id?: string; id?: string;
/** additional padding where interacting with an edge is still possible */
interactionWidth?: number; interactionWidth?: number;
className?: string; className?: string;
/** x position of edge label */
labelX?: number; labelX?: number;
/** y position of edge label */
labelY?: number; labelY?: number;
/** marker at start of edge
* @example 'url(#arrow)'
*/
markerStart?: string; markerStart?: string;
/** marker at end of edge
* @example 'url(#arrow)'
*/
markerEnd?: string; markerEnd?: string;
/** svg path of the edge */
path: string; path: string;
style?: CSSProperties; style?: CSSProperties;
}; };
@@ -5,10 +5,19 @@ export type BaseEdgeProps = Pick<
'interactionWidth' | 'label' | 'labelStyle' | 'style' 'interactionWidth' | 'label' | 'labelStyle' | 'style'
> & { > & {
id?: string; id?: string;
/** svg path of the edge */
path: string; path: string;
/** x coordinate of the label */
labelX?: number; labelX?: number;
/** y coordinate of the label */
labelY?: number; labelY?: number;
/** marker at start of edge
* @example 'url(#arrow)'
*/
markerStart?: string; markerStart?: string;
/** marker at end of edge
* @example 'url(#arrow)'
*/
markerEnd?: string; markerEnd?: string;
class?: string; class?: string;
}; };