import { default as React } from 'react'; import { default as PropTypes } from 'prop-types'; import { VALID_ICON_NAMES } from '../icons/iconNames'; import { IconName } from '../types/Icon.types'; export { VALID_ICON_NAMES }; export type IconButtonKind = "action" | "plain" | "themed"; export interface IconButtonProps { /** Name of Narmi icon */ name: IconName; /** Renders the icon button label */ label?: string; /** disables the icon button when set to `true` */ disabled?: boolean; /** style of icon button to render */ kind?: IconButtonKind; /** type attribute for underlying HTML button element */ type?: string; /** Optional text size of the icon in the icon button defaults different for different kinds (plain/action)*/ textSize?: "xs" | "s" | "m" | "l"; /** Click callback, with event object passed as argument */ onClick?: (event: React.MouseEvent) => void; /** Optional value for `data-testid` attribute */ testId?: string; /** className for adding classNames to the icon button */ className?: string; /** * The html element to render as the root node of `Button`. * * When rendering as an "a" you **MUST** pass an `href` attribute * for the anchor to be valid. */ as?: "a" | "button"; [x: string]: unknown; } /** * Narmi style Icon Button. * * Icon Button renders a button with a central Narmi icon * */ declare const IconButton: { ({ disabled, kind, textSize, testId, label, name, onClick, type, as, ...otherProps }: IconButtonProps): React.JSX.Element; propTypes: { /** Name of Narmi icon */ name: PropTypes.Validator; /** Renders the icon button label */ label: PropTypes.Requireable; /** disables the icon button when set to `true` */ disabled: PropTypes.Requireable; /** style of icon button to render */ kind: PropTypes.Requireable; /** type attribute for underlying HTML button element */ type: PropTypes.Requireable; /** Optional text size of the icon in the icon button defaults different for different kinds (plain/action)*/ textSize: PropTypes.Requireable; /** Click callback, with event object passed as argument */ onClick: PropTypes.Requireable<(...args: any[]) => any>; /** Optional value for `data-testid` attribute */ testId: PropTypes.Requireable; /** className for adding classNames to the icon button */ className: PropTypes.Requireable; /** * The html element to render as the root node of `Button`. * * When rendering as an "a" you **MUST** pass an `href` attribute * for the anchor to be valid. */ as: PropTypes.Requireable; }; }; export default IconButton; //# sourceMappingURL=index.d.ts.map