import * as React from 'react'; export default class SampleLabelSVG extends React.Component< ISampleLabelSVGProps, {} > { static defaultProps = { r: 10, }; constructor(props: ISampleLabelSVGProps) { super(props); this.render = this.render.bind(this); } public render() { const { label, color, x, y } = this.props; return ( {label} ); } } export interface ISampleLabelSVGProps { label: string; color: string; x: number; y: number; r?: number; textDy?: number; } export class SampleLabelHTML extends React.Component< ISampleLabelHTMLProps, {} > { constructor(props: ISampleLabelHTMLProps) { super(props); this.render = this.render.bind(this); } public render() { const { label, color, fillOpacity } = this.props; return ( {label} ); } } interface ISampleLabelHTMLProps { label: string; color: string; fillOpacity: number; }