UNPKG

696 BTypeScriptView Raw
1import { BoxProps } from "../Box";
2import * as React from "react";
3import { Icons } from "../theme/icons";
4import { Omit } from "../common-types";
5
6interface IIcon {
7 /**
8 * The size of the icon.
9 */
10 size?: string;
11 /**
12 * The name of the icon.
13 */
14 name?: Icons | string;
15 /**
16 * The color of the icon.
17 */
18 color?: string;
19 /**
20 * The role of the icon. `presentation` or `img`
21 */
22 role?: "presentation" | "img";
23 /**
24 * If `false`, it means the icon is used within interactive
25 * element and won't be focuable.
26 */
27 focusable?: boolean;
28}
29
30export type IconProps = IIcon & Omit<BoxProps, "size">;
31
32declare const Icon: React.FC<IconProps>;
33
34export default Icon;