import { IconType } from "@vitality-ds/icons/src/Icon/types"; import { ComponentProps, ExcludedProps, VariantProps } from "@vitality-ds/system"; import React from "react"; import { BaseIconButton, BaseIconButtonLink } from "./styled"; declare type BaseIconButtonProps = VariantProps & ComponentProps; declare type BaseIconButtonLinkProps = VariantProps & ComponentProps; /** * As we use a ternary operator to determine if a Link or Button component should be rendered, we need to type its return value */ export declare type BaseIconButtonComponentProps = React.FC | React.FC; export declare type IconButtonProps = ExcludedProps & VariantProps & ComponentProps & ComponentProps & { /** * Pass in an appropriate Vitality icon that describes the action to be performed. */ icon: IconType; /** * For toggle states. State should be handled outside the component and passed in. */ isSelected?: boolean; /** * Action to perform when clicking the IconButton */ onClick?: (event: unknown) => unknown; /** * Support the user to understand what action will be performed */ tooltipContent: string; /** * Optional href for cases where clicking the button should navigate to another page. * Component will render an element instead of a button. */ href?: string; /** * IconButtons do not accept children. Use the `icon` prop to pass the icon. */ children?: never; }; export {};