import { type ComponentPropsWithoutRef, type ElementType } from 'react'; import { type IconButtonSlotRecipeVariant } from '../../styled-system/recipes'; type IconButtonCommonProps = { /** * Whether the button has an outline style * * @default false */ outlined?: IconButtonSlotRecipeVariant['outlined']; /** * Icon element to be rendered inside the button * Only one element allowed */ children: React.ReactNode; /** * Whether the button is disabled. * If it's provided, the component will be rendered as a button element even if the href prop is provided. * * @default false */ disabled?: boolean; /** * The path or URL to the linked page. * If it's provided, the component will be rendered as an anchor element. */ href?: string; /** * The component to use as the navigation link instead of the general anchor element ``. * The custom component must extend the HTMLAnchorElement interface. * * Use this property if you want to use a custom component as the link tag. * e.g. next/link */ customLinkComponent?: ElementType; }; export type IconButtonProps = IconButtonCommonProps & ComponentPropsWithoutRef<'button'> & Pick, 'download' | 'hrefLang' | 'ping' | 'rel' | 'target' | 'type' | 'referrerPolicy'>; export type IconButtonInternalProps = IconButtonProps & { /** * Size of the icon button. * This prop is internal-only and not exposed from the public IconButton API. * * @default 'default' */ size?: IconButtonSlotRecipeVariant['size']; }; export {};