import React from "react"; import { ButtonProps } from "../Button/Button"; import { TestableComponent } from "../interfaces"; import { ValidIconName } from "./canonicalIconNames"; import { TestIconProps } from "./TestIcon"; interface ExtendedButtonProps extends Omit, TestableComponent { /** * Canonical icon name, or an array of strings. * In case of the array the first valid icon name is used. */ name: ValidIconName | string[] | React.ReactElement; /** * Button text, will be displayed as tooltip. */ text?: string; /** * If `text` should be set as HTML `title` attribute instead of attaching it as tooltip. * If true then `tooltipProps` is ignored. */ tooltipAsTitle?: boolean; /** * Description for icon as accessibility fallback. * If not set then `text` is used. */ description?: string; /** * Button is displayed with minimal styles (no borders, no background color). */ minimal?: boolean; } export type IconButtonProps = ExtendedButtonProps; /** A button with an icon instead of text. */ export declare const IconButton: ({ className, name, text, tooltipProps, description, tooltipAsTitle, minimal, ...restProps }: IconButtonProps) => React.JSX.Element; export default IconButton;