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

28 lines
1.1 KiB
Plaintext

import { AriaToggleProps } from "@react-types/checkbox";
import { InputHTMLAttributes, LabelHTMLAttributes } from "react";
import { RefObject } from "@react-types/shared";
import { ToggleState } from "@react-stately/toggle";
export interface ToggleAria {
/** Props to be spread on the label element. */
labelProps: LabelHTMLAttributes<HTMLLabelElement>;
/** Props to be spread on the input element. */
inputProps: InputHTMLAttributes<HTMLInputElement>;
/** Whether the toggle is selected. */
isSelected: boolean;
/** Whether the toggle is in a pressed state. */
isPressed: boolean;
/** Whether the toggle is disabled. */
isDisabled: boolean;
/** Whether the toggle is read only. */
isReadOnly: boolean;
/** Whether the toggle is invalid. */
isInvalid: boolean;
}
/**
* Handles interactions for toggle elements, e.g. Checkboxes and Switches.
*/
export function useToggle(props: AriaToggleProps, state: ToggleState, ref: RefObject<HTMLInputElement | null>): ToggleAria;
export type { AriaToggleProps } from '@react-types/checkbox';
//# sourceMappingURL=types.d.ts.map