UNPKG

@awsui/components-react

Version:

AWS UI is a collection of [React](https://reactjs.org/) components that help create intuitive, responsive, and accessible user experiences for web applications. It is developed by Amazon Web Services (AWS). This work is available under the terms of the [A

21 lines (20 loc) 1.17 kB
import React from 'react'; import { PieArcDatum } from 'd3-shape'; import { PieChartProps } from './interfaces'; import { InternalChartDatum } from './pie-chart'; interface SegmentsProps<T> { pieData: Array<PieArcDatum<InternalChartDatum<T>>>; highlightedSegment: T | null; size: NonNullable<PieChartProps['size']>; variant: PieChartProps['variant']; containerRef: React.RefObject<HTMLDivElement>; focusOutlineRef: React.RefObject<SVGRectElement>; segmentAriaRoleDescription?: string; onClick: (datum: InternalChartDatum<T>, trigger: Element | null) => void; onMouseOver: (datum: InternalChartDatum<T>, trigger: Element | null) => void; onMouseOut: () => void; onKeyDown: (visibleIndex: number, trigger: Element | null, event: React.KeyboardEvent) => void; onFocus: (datum: InternalChartDatum<T>, trigger: Element | null, event: React.FocusEvent) => void; } export default function Segments<T extends PieChartProps.Datum>({ pieData, highlightedSegment, size, variant, containerRef, focusOutlineRef, segmentAriaRoleDescription, onClick, onMouseOver, onMouseOut, onKeyDown, onFocus }: SegmentsProps<T>): JSX.Element; export {};