Skip to content

Commit

Permalink
feature(typescript): expose ArcherContainerRef type
Browse files Browse the repository at this point in the history
  • Loading branch information
pierpo committed Mar 8, 2023
1 parent b0f49ba commit ce9dd1b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ArcherContainer/ArcherContainer.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export type ArcherContainerProps = {
children?: React.ReactNode | FunctionChild;
};

export type ArcherContainerHandle = {
export type ArcherContainerRef = {
/**
* Use this to recompute all the arrow positions. Useful if arrows do not properly rerender
* after the viewport or some elements moved.
Expand All @@ -75,4 +75,8 @@ export type ArcherContainerHandle = {
arrowMarkerUniquePrefix: string;
};

// Keep this name for retrocompatibility
// should be a breaking change of 4.0.0
export type ArcherContainerHandle = ArcherContainerRef;

export type SourceToTargetsArrayType = SourceToTargetType[];
1 change: 1 addition & 0 deletions src/react-archer.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export { default as ArcherElement } from './ArcherElement/ArcherElement';
export { default as ArcherContainer } from './ArcherContainer/ArcherContainer';
export { ArcherContainerRef } from './ArcherContainer/ArcherContainer.types';

0 comments on commit ce9dd1b

Please sign in to comment.