Skip to content

Commit

Permalink
add legend types
Browse files Browse the repository at this point in the history
  • Loading branch information
annacmc committed Dec 12, 2024
1 parent 1696cab commit f064255
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions projects/js-packages/charts/src/components/legend/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { scaleOrdinal } from '@visx/scale';

export type LegendItem = {
label: string;
value: number | string;
color: string;
};

export type LegendProps = {
items: LegendItem[];
className?: string;
orientation?: 'horizontal' | 'vertical';
scale?: ReturnType< typeof scaleOrdinal >;
};

0 comments on commit f064255

Please sign in to comment.