UNPKG

@primer/react

Version:

An implementation of GitHub's Primer Design System using React

21 lines 1.33 kB
import type { ButtonHTMLAttributes } from 'react'; import type React from 'react'; import type { IconProps } from '@primer/octicons-react'; import type { SxProp } from '../sx'; import type { TooltipDirection } from '../TooltipV2'; export type SegmentedControlIconButtonProps = { 'aria-label': string; /** The icon that represents the segmented control item */ icon: React.FunctionComponent<React.PropsWithChildren<IconProps>> | React.ReactElement; /** Whether the segment is selected. This is used for controlled SegmentedControls, and needs to be updated using the onChange handler on SegmentedControl. */ selected?: boolean; /** Whether the segment is selected. This is used for uncontrolled SegmentedControls to pick one SegmentedControlButton that is selected on the initial render. */ defaultSelected?: boolean; /** Supplementary description that renders inside tooltip in place of the label.*/ description?: string; /** The direction for the tooltip.*/ tooltipDirection?: TooltipDirection; } & SxProp & ButtonHTMLAttributes<HTMLButtonElement | HTMLLIElement>; export declare const SegmentedControlIconButton: React.FC<React.PropsWithChildren<SegmentedControlIconButtonProps>>; export default SegmentedControlIconButton; //# sourceMappingURL=SegmentedControlIconButton.d.ts.map