import * as react from 'react'; import { ReactNode, MouseEventHandler } from 'react'; import * as _heroui_system from '@heroui/system'; import { HTMLHeroUIProps, PropGetter } from '@heroui/system'; import { ButtonVariantProps } from '@heroui/theme'; import { AriaButtonProps } from '@heroui/use-aria-button'; import { RippleProps } from '@heroui/ripple'; import { ReactRef } from '@heroui/react-utils'; interface Props extends HTMLHeroUIProps<"button"> { /** * Ref to the DOM node. */ ref?: ReactRef; /** * Whether the button should display a ripple effect on press. * @default false */ disableRipple?: boolean; /** * The button start content. */ startContent?: ReactNode; /** * The button end content. */ endContent?: ReactNode; /** * Spinner to display when loading. * @see https://heroui.com/components/spinner */ spinner?: ReactNode; /** * The spinner placement. * @default "start" */ spinnerPlacement?: "start" | "end"; /** * Whether the button should display a loading spinner. * @default false */ isLoading?: boolean; /** * The native button click event handler. * use `onPress` instead. * @deprecated */ onClick?: MouseEventHandler; } type UseButtonProps = Props & Omit & Omit; declare function useButton(props: UseButtonProps): { Component: _heroui_system.As; children: ReactNode; domRef: react.RefObject; spinner: ReactNode; styles: string; startContent: react.DetailedReactHTMLElement, HTMLElement> | null; endContent: react.DetailedReactHTMLElement, HTMLElement> | null; isLoading: boolean; spinnerPlacement: "start" | "end"; spinnerSize: "md" | "sm" | "lg" | undefined; disableRipple: boolean; getButtonProps: PropGetter; getRippleProps: () => RippleProps; isIconOnly: boolean; }; type UseButtonReturn = ReturnType; export { type UseButtonProps, type UseButtonReturn, useButton };