UNPKG

752 BTypeScriptView Raw
1import * as React from "react";
2import { ButtonProps } from "../Button";
3import { Omit } from "../common-types";
4import { Icons } from "../theme/icons";
5
6type _ButtonProps = Omit<
7 ButtonProps,
8 | "loadingText"
9 | "isFullWidth"
10 | "leftIcon"
11 | "rightIcon"
12 | "iconSpacing"
13 | "children"
14>;
15
16interface IIconButton {
17 /**
18 * The icon to be used in the button.
19 */
20 icon?: Icons | React.ComponentType;
21 /**
22 * If `true`, the button will be perfectly round. Else, it'll be slightly round
23 */
24 isRound?: boolean;
25 /**
26 * A11y: A label that describes the button
27 */
28 "aria-label": string;
29}
30
31export type IconButtonProps = IIconButton & _ButtonProps;
32
33declare const IconButton: React.FC<IconButtonProps>;
34
35export default IconButton;