added typedocs for plugins

This commit is contained in:
peterkogo
2024-01-15 17:38:54 +01:00
parent e35e0348fe
commit 8c32b426f4
10 changed files with 151 additions and 0 deletions
@@ -4,17 +4,31 @@ import type { PanelPosition } from '@xyflow/system';
import type { FitViewOptions } from '../../types';
export type ControlProps = {
/** show button for zoom in/out */
showZoom?: boolean;
/** show button for fit view */
showFitView?: boolean;
/** show button for toggling interactivity */
showInteractive?: boolean;
/** options being used when fit view button is clicked */
fitViewOptions?: FitViewOptions;
/** callback when zoom in button is clicked */
onZoomIn?: () => void;
/** callback when zoom out button is clicked */
onZoomOut?: () => void;
/** callback when fit view button is clicked */
onFitView?: () => void;
/** callback when interactivity is toggled */
onInteractiveChange?: (interactiveStatus: boolean) => void;
/** position of the controls on the pane
* @example PanelPosition.TopLeft, PanelPosition.TopRight,
* PanelPosition.BottomLeft, PanelPosition.BottomRight
*/
position?: PanelPosition;
children?: ReactNode;
/** style applied to container */
style?: React.CSSProperties;
/**className applied to container */
className?: string;
'aria-label'?: string;
};