reagraph
Version:
WebGL Node-based Graph for React
43 lines (42 loc) • 1.07 kB
TypeScript
import { FC } from 'react';
import { NodeRendererProps } from '../../types';
export type BadgePosition = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'center' | 'custom';
export interface BadgeProps extends NodeRendererProps {
/**
* The text to display in the badge.
*/
label: string;
/**
* Background color of the badge.
*/
backgroundColor?: string;
/**
* Text color of the badge.
*/
textColor?: string;
/**
* Stroke color of the badge border.
*/
strokeColor?: string;
/**
* Size of the badge border stroke.
*/
strokeWidth?: number;
/**
* Corner radius of the badge.
*/
radius?: number;
/**
* Size multiplier for the badge relative to the node size.
*/
badgeSize?: number;
/**
* Position offset from the node center or preset position.
*/
position?: [number, number, number] | BadgePosition;
/**
* Padding around the badge text.
*/
padding?: number;
}
export declare const Badge: FC<BadgeProps>;