import * as react from 'react'; import { ReactNode, MouseEventHandler } from 'react'; import * as _nextui_org_system from '@nextui-org/system'; import { PropGetter, HTMLNextUIProps } from '@nextui-org/system'; import { ButtonVariantProps } from '@nextui-org/theme'; import { AriaButtonProps } from '@nextui-org/use-aria-button'; import { RippleProps } from '@nextui-org/ripple'; import { ReactRef } from '@nextui-org/react-utils'; interface Props extends HTMLNextUIProps<"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://nextui.org/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: _nextui_org_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: "sm" | "md" | "lg" | undefined; disableRipple: boolean; getButtonProps: PropGetter, _nextui_org_system.DOMAttributes<_nextui_org_system.DOMElement>>; getRippleProps: () => RippleProps; isIconOnly: boolean; }; type UseButtonReturn = ReturnType; export { UseButtonProps, UseButtonReturn, useButton };