Files
NapCatQQ/.pnpm-store/v3/files/e2/2efdac1c2f45cd327f7e24fc43f5a5c3f5b3f9888a0067568d9233040516387f93f7f2fd9c0134ed25286bb99a2c96fbc7913b50bd6ea640eeaeaa6453f4dd
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

23 lines
1.5 KiB
Plaintext

import { ElementType, RefObject, ButtonHTMLAttributes, AnchorHTMLAttributes, HTMLAttributes, InputHTMLAttributes } from 'react';
import { AriaButtonProps as AriaButtonProps$1 } from '@react-types/button';
import { DOMAttributes } from '@react-types/shared';
type AriaButtonProps<T extends ElementType = "button"> = AriaButtonProps$1<T> & {
/** Whether text selection should be enabled on the pressable element. */
allowTextSelectionOnPress?: boolean;
};
interface ButtonAria<T> {
/** Props for the button element. */
buttonProps: T;
/** Whether the button is currently pressed. */
isPressed: boolean;
}
declare function useAriaButton(props: AriaButtonProps<"button">, ref: RefObject<HTMLButtonElement>): ButtonAria<ButtonHTMLAttributes<HTMLButtonElement>>;
declare function useAriaButton(props: AriaButtonProps<"a">, ref: RefObject<HTMLAnchorElement>): ButtonAria<AnchorHTMLAttributes<HTMLAnchorElement>>;
declare function useAriaButton(props: AriaButtonProps<"div">, ref: RefObject<HTMLDivElement>): ButtonAria<HTMLAttributes<HTMLDivElement>>;
declare function useAriaButton(props: AriaButtonProps<"input">, ref: RefObject<HTMLInputElement>): ButtonAria<InputHTMLAttributes<HTMLInputElement>>;
declare function useAriaButton(props: AriaButtonProps<"span">, ref: RefObject<HTMLSpanElement>): ButtonAria<HTMLAttributes<HTMLSpanElement>>;
declare function useAriaButton(props: AriaButtonProps<ElementType>, ref: RefObject<Element>): ButtonAria<DOMAttributes>;
export { AriaButtonProps, ButtonAria, useAriaButton };