Skip to content

MinimapNodeStyleFn

since v1.0.0

MinimapNodeStyleFn = (node) => MinimapNodeStyle | null | undefined

Function signature for the nodeStyle callback. Return style properties to override defaults, or null/undefined to use defaults.

Node

MinimapNodeStyle | null | undefined

const nodeStyle: MinimapNodeStyleFn = (node) => ({
fill: node.type === 'database' ? '#4CAF50' : '#9E9E9E',
opacity: node.selected ? 1 : 0.6,
});