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