28 lines
1.2 KiB
TypeScript
28 lines
1.2 KiB
TypeScript
import * as React from 'react';
|
|
import { SxProps, Theme } from '@mui/material/styles';
|
|
import type { Direction } from "./direction.js";
|
|
import { SeriesLegendItemContext } from "./legendContext.types.js";
|
|
import { type ChartsLegendClasses } from "./chartsLegendClasses.js";
|
|
export interface ChartsLegendProps {
|
|
/**
|
|
* Callback fired when a legend item is clicked.
|
|
* @param {React.MouseEvent<HTMLButtonElement, MouseEvent>} event The click event.
|
|
* @param {SeriesLegendItemContext} legendItem The legend item data.
|
|
* @param {number} index The index of the clicked legend item.
|
|
*/
|
|
onItemClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, legendItem: SeriesLegendItemContext, index: number) => void;
|
|
/**
|
|
* The direction of the legend layout.
|
|
* The default depends on the chart.
|
|
*/
|
|
direction?: Direction;
|
|
/**
|
|
* Override or extend the styles applied to the component.
|
|
*/
|
|
classes?: Partial<ChartsLegendClasses>;
|
|
className?: string;
|
|
sx?: SxProps<Theme>;
|
|
tabIndex?: number;
|
|
}
|
|
declare const ChartsLegend: React.ForwardRefExoticComponent<ChartsLegendProps & import("./chartsLegend.types.js").ChartsLegendSlotExtension & React.RefAttributes<{}>>;
|
|
export { ChartsLegend }; |