@primer/react
Version:
An implementation of GitHub's Primer Design System using React
18 lines (17 loc) • 1.11 kB
TypeScript
import { ButtonProps } from "../../Button/types.js";
import React from "react";
import { IconProps } from "@primer/octicons-react";
//#region src/internal/components/TextInputInnerAction.d.ts
type TextInputActionProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'aria-label' | 'size' | 'tooltipDirection'> & {
/** @deprecated Text input action buttons should only use icon buttons */children?: React.ReactNode; /** Text that appears in a tooltip. If an icon is passed, this is also used as the label used by assistive technologies. */
['aria-label']?: string; /** Position of tooltip. If no position is passed or defaults to "n" */
tooltipDirection?: 'n' | 'ne' | 'e' | 'se' | 's' | 'sw' | 'w' | 'nw'; /** The icon to render inside the button */
icon?: React.FunctionComponent<React.PropsWithChildren<IconProps>>;
/**
* @deprecated Text input action buttons should only use the 'invisible' button variant
* Determine's the styles on a button one of 'default' | 'primary' | 'invisible' | 'danger'
*/
variant?: ButtonProps['variant'];
};
//#endregion
export { TextInputActionProps };