From 589421542386906ec49d8469cac551b8f7ea1c47 Mon Sep 17 00:00:00 2001 From: Dimitri POSTOLOV Date: Tue, 25 Mar 2025 22:28:17 +0100 Subject: [PATCH] add changeset --- .changeset/healthy-baboons-judge.md | 5 +++++ .../src/additional-components/NodeToolbar/types.ts | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 .changeset/healthy-baboons-judge.md diff --git a/.changeset/healthy-baboons-judge.md b/.changeset/healthy-baboons-judge.md new file mode 100644 index 00000000..b31a6857 --- /dev/null +++ b/.changeset/healthy-baboons-judge.md @@ -0,0 +1,5 @@ +--- +'@xyflow/react': patch +--- + +fix: improve TSDoc comments for `NodeToolbarProps` diff --git a/packages/react/src/additional-components/NodeToolbar/types.ts b/packages/react/src/additional-components/NodeToolbar/types.ts index 91a717da..96756983 100644 --- a/packages/react/src/additional-components/NodeToolbar/types.ts +++ b/packages/react/src/additional-components/NodeToolbar/types.ts @@ -5,7 +5,10 @@ import type { Position, Align } from '@xyflow/system'; * @expand */ export type NodeToolbarProps = HTMLAttributes & { - /** Id of the node, or array of ids the toolbar should be displayed at */ + /** + * By passing in an array of node id's you can render a single tooltip for a group or collection + * of nodes. + */ nodeId?: string | string[]; /** If true, node toolbar is visible even if node is not selected */ isVisible?: boolean; @@ -15,7 +18,10 @@ export type NodeToolbarProps = HTMLAttributes & { * Position.BottomLeft, Position.BottomRight */ position?: Position; - /** Offset the toolbar from the node */ + /** + * The space between the node and the toolbar, measured in pixels. + * @default 10 + */ offset?: number; /** * Align the toolbar relative to the node