UNPKG

@primer/react

Version:

An implementation of GitHub's Primer Design System using React

15 lines (14 loc) 960 B
import React, { ButtonHTMLAttributes } from 'react'; import { IconProps } from '@primer/octicons-react'; import { SxProp } from '../sx'; export type SegmentedControlIconButtonProps = { 'aria-label': string; /** The icon that represents the segmented control item */ icon: React.FunctionComponent<React.PropsWithChildren<IconProps>>; /** 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; } & SxProp & ButtonHTMLAttributes<HTMLButtonElement | HTMLLIElement>; export declare const SegmentedControlIconButton: React.FC<React.PropsWithChildren<SegmentedControlIconButtonProps>>; export default SegmentedControlIconButton;