import type { ComponentType } from '../../jsx'; import { Ellipse, Group, Rect } from '../../jsx'; import { getItemProps } from '../utils'; import { registerItem } from './registry'; import type { BaseItemProps } from './types'; export interface SimpleCircleNodeProps extends BaseItemProps { width?: number; height?: number; strokeWidth?: number; } export const SimpleCircleNode: ComponentType = ( props, ) => { const [ { width = 24, height = width, strokeWidth = 2, themeColors, datum }, restProps, ] = getItemProps(props, ['width', 'height']); const size = Math.min(width, height) - strokeWidth; const offset = strokeWidth / 2; return ( {datum.label || datum.desc} ); }; registerItem('simple-circle-node', { component: SimpleCircleNode, composites: [], });