UNPKG

@blockscout/ui-toolkit

Version:

A comprehensive collection of reusable Chakra UI components and theme system for Blockscout's projects

21 lines (20 loc) 805 B
import { default as React } from 'react'; import { ChartMargin } from '../types'; import { SankeyChartData, SankeyChartLinkExtended, SankeyChartNodeExtended } from './types'; interface Props { data: SankeyChartData; margin?: ChartMargin; nodeWidth?: number; nodePadding?: number; } interface UseSankeyControllerResult { ref: React.Ref<SVGSVGElement> | undefined; readonly rect: DOMRect | null; readonly innerWidth: number; readonly innerHeight: number; readonly nodes: Array<SankeyChartNodeExtended>; readonly links: Array<SankeyChartLinkExtended>; readonly linkPathGenerator: (link: SankeyChartLinkExtended) => string | null; } export declare function useSankeyController({ data, margin, nodeWidth, nodePadding }: Props): UseSankeyControllerResult; export {};