import { AnchorHTMLAttributes, ButtonHTMLAttributes, ForwardRefExoticComponent, RefAttributes, } from 'react'; export type TButtonAnchorRenderAnchor = ForwardRefExoticComponent< any & RefAttributes >; export interface IButtonAnchorBaseProps { renderAnchor?: TButtonAnchorRenderAnchor; } export interface IButtonAnchorBtn extends IButtonAnchorBaseProps, Omit, 'children'> { /** Element tagName */ tag: 'button'; /** Button type */ type: ButtonHTMLAttributes['type']; } export interface IButtonAnchorLink extends IButtonAnchorBaseProps, Omit, 'children'> { /** Element tagName */ tag: 'a'; /** Link */ href: string; } export type TButtonAnchor = IButtonAnchorLink | IButtonAnchorBtn;