chore(types): cleanup
This commit is contained in:
@@ -2,10 +2,11 @@
|
||||
import { memo } from 'react';
|
||||
import cc from 'classcat';
|
||||
import shallow from 'zustand/shallow';
|
||||
import { useStore, getRectOfNodes, ReactFlowState, Rect, Panel, getBoundsOfRects } from '@reactflow/core';
|
||||
import { useStore, getRectOfNodes, getBoundsOfRects, Panel } from '@reactflow/core';
|
||||
import type { ReactFlowState, Rect } from '@reactflow/core';
|
||||
|
||||
import MiniMapNode from './MiniMapNode';
|
||||
import { MiniMapProps, GetMiniMapNodeAttribute } from './types';
|
||||
import type { MiniMapProps, GetMiniMapNodeAttribute } from './types';
|
||||
|
||||
declare const window: any;
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { memo, CSSProperties } from 'react';
|
||||
import { memo } from 'react';
|
||||
import type { CSSProperties } from 'react';
|
||||
import cc from 'classcat';
|
||||
|
||||
interface MiniMapNodeProps {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
import { HTMLAttributes } from 'react';
|
||||
import { Node, PanelPosition } from '@reactflow/core';
|
||||
import type { HTMLAttributes } from 'react';
|
||||
import type { Node, PanelPosition } from '@reactflow/core';
|
||||
|
||||
export type GetMiniMapNodeAttribute<NodeData = any> = (node: Node<NodeData>) => string;
|
||||
|
||||
export interface MiniMapProps<NodeData = any> extends HTMLAttributes<SVGSVGElement> {
|
||||
export type MiniMapProps<NodeData = any> = HTMLAttributes<SVGSVGElement> & {
|
||||
nodeColor?: string | GetMiniMapNodeAttribute<NodeData>;
|
||||
nodeStrokeColor?: string | GetMiniMapNodeAttribute<NodeData>;
|
||||
nodeClassName?: string | GetMiniMapNodeAttribute<NodeData>;
|
||||
@@ -12,4 +12,4 @@ export interface MiniMapProps<NodeData = any> extends HTMLAttributes<SVGSVGEleme
|
||||
nodeStrokeWidth?: number;
|
||||
maskColor?: string;
|
||||
position?: PanelPosition;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user