From 3aa12a3b8894fd76e8501bf2c7b3c3e46c149e8c Mon Sep 17 00:00:00 2001 From: plouc Date: Wed, 16 Dec 2020 09:04:56 +0900 Subject: [PATCH] feat(arcs): improve label accessor in ArcLinkLabelsProps --- packages/arcs/src/arc_link_labels/compute.ts | 2 +- packages/arcs/src/arc_link_labels/props.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/arcs/src/arc_link_labels/compute.ts b/packages/arcs/src/arc_link_labels/compute.ts index 062a12685..e64f5d31a 100644 --- a/packages/arcs/src/arc_link_labels/compute.ts +++ b/packages/arcs/src/arc_link_labels/compute.ts @@ -25,7 +25,7 @@ export const computeArcLinkTextAnchor = (arc: Arc): 'start' | 'end' => { /** * Compute the link of a single arc, returning its points, - * please not that points coordinates are relative to + * please note that points coordinates are relative to * the center of the arc. */ export const computeArcLink = ( diff --git a/packages/arcs/src/arc_link_labels/props.ts b/packages/arcs/src/arc_link_labels/props.ts index 63ada9bcc..57e4477b7 100644 --- a/packages/arcs/src/arc_link_labels/props.ts +++ b/packages/arcs/src/arc_link_labels/props.ts @@ -1,10 +1,10 @@ +import { PropertyAccessor } from '@nivo/core' import { InheritedColorConfig } from '@nivo/colors' import { ArcLinkLabelComponent } from './ArcLinkLabelsLayer' import { DatumWithArcAndColor } from '../types' export interface ArcLinkLabelsProps { - // string | LabelAccessorFunction - arcLinkLabel: any + arcLinkLabel: PropertyAccessor arcLinkLabelsSkipAngle: number arcLinkLabelsTextOffset: number arcLinkLabelsTextColor: InheritedColorConfig