import type { AnchorHTMLAttributes, ButtonHTMLAttributes, ComponentType, ReactNode } from 'react'; import React from 'react'; import type { ButtonType, CommonProps } from '../Button/Button'; import type { Props as IconProps } from '../Icon/Icon'; interface Props extends Omit { /** * Icon shown in icon button component * * @default `EditUnderline` */ icon?: IconProps['icon']; /** * Allows to hide passed children on mobile screen size view (<576px) * * @default false */ hideChildrenMobile?: boolean; /** * Allows to reverse order of elements * * @default false */ isReversed?: boolean; /** * Aria-expanded for screen readers * * @default undefined */ ariaExpanded?: boolean; /** * Screen reader label describing the purpose of the ButtonIcon, */ ariaLabel?: string; /** * Show the element with link color (pink) */ isLinkStyle?: boolean; } export type ButtonProps = Props & Omit, keyof Props | 'href' | 'nextLink' | 'target'> & { /** * Name of the button element */ name?: string; /** * Allows to change the HTML type of button element. Ignored when `href` is defined * * @param {ButtonType} submit Button submits the form data * @param {ButtonType} button No functionality when pressed * @param {ButtonType} reset Button resets all the controls to their initial values * * @default 'button' */ type?: ButtonType; /** * Allows disabling the component functionality. * When `href` is defined, disables the link functionality. * * @default false */ disabled?: boolean; }; export type AnchorProps = Props & Omit, keyof Props | 'name' | 'disabled' | 'type'> & { /** * Allows to change the type of resulting HTML element from button (``) to anchor (``) */ href?: string; /** * Allows to use a custom link component instead of anchor element when `href` is defined */ nextLink?: ComponentType<{ href: string; children: ReactNode; }>; /** * Allows to set the target attribute for the link */ target?: '_self' | '_blank' | '_parent' | '_top'; }; /** @visibleName Button Icon */ declare const ButtonIcon: React.ForwardRefExoticComponent<(ButtonProps | AnchorProps) & React.RefAttributes>; /** @component */ export default ButtonIcon;