@primer/react
Version:
An implementation of GitHub's Primer Design System using React
16 lines (15 loc) • 1.18 kB
TypeScript
import { TooltipDirection } from "../TooltipV2/Tooltip.js";
import React, { ButtonHTMLAttributes } from "react";
import { IconProps } from "@primer/octicons-react";
//#region src/SegmentedControl/SegmentedControlIconButton.d.ts
type SegmentedControlIconButtonProps = {
'aria-label': string; /** The icon that represents the segmented control item */
icon: React.FunctionComponent<React.PropsWithChildren<IconProps>> | React.ReactElement<any>; /** 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; /** Whether the button is disabled. */
disabled?: boolean;
} & ButtonHTMLAttributes<HTMLButtonElement | HTMLLIElement>;
//#endregion
export { SegmentedControlIconButtonProps };