import * as react from 'react'; import { ReactNode, MouseEventHandler } from 'react'; import * as _jala_banyu_system from '@jala-banyu/system'; import { PropGetter, HTMLBanyuProps } from '@jala-banyu/system'; import { ButtonVariantProps } from '@jala-banyu/theme'; import { AriaButtonProps } from '@jala-banyu/use-aria-button'; import { RippleProps } from '@jala-banyu/ripple'; import { ReactRef } from '@jala-banyu/react-utils'; interface Props extends HTMLBanyuProps<"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. */ 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. */ onClick?: MouseEventHandler; /** An accessibility label for this item. */ "aria-label"?: string; } type UseButtonProps = Props & Omit & Omit; declare function useButton(props: UseButtonProps): { Component: _jala_banyu_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" | "xs" | undefined; disableRipple: boolean; getButtonProps: PropGetter, _jala_banyu_system.DOMAttributes<_jala_banyu_system.DOMElement>>; getRippleProps: () => RippleProps; isIconOnly: boolean; }; type UseButtonReturn = ReturnType; export { type UseButtonProps, type UseButtonReturn, useButton };