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

45 lines
1.7 KiB
Plaintext

import * as react from 'react';
import * as _heroui_system from '@heroui/system';
import { PropGetter, HTMLHeroUIProps } from '@heroui/system';
import { ButtonProps } from './button.js';
import { ButtonGroupVariantProps } from '@heroui/theme';
import { ReactRef } from '@heroui/react-utils';
import './use-button.js';
import '@heroui/use-aria-button';
import '@heroui/ripple';
interface Props extends HTMLHeroUIProps, ButtonGroupVariantProps {
/**
* Ref to the DOM node.
*/
ref?: ReactRef<HTMLDivElement | null>;
/**
* Whether the buttons are disabled.
* @default false
*/
isDisabled?: ButtonProps["isDisabled"];
}
type ContextType = {
size?: ButtonProps["size"];
color?: ButtonProps["color"];
variant?: ButtonProps["variant"];
radius?: ButtonProps["radius"];
isDisabled?: ButtonProps["isDisabled"];
disableAnimation?: ButtonProps["disableAnimation"];
disableRipple?: ButtonProps["disableRipple"];
isIconOnly?: ButtonProps["isIconOnly"];
fullWidth?: boolean;
};
type UseButtonGroupProps = Props & Partial<Pick<ButtonProps, "size" | "color" | "radius" | "variant" | "isIconOnly" | "disableAnimation" | "disableRipple">>;
declare function useButtonGroup(originalProps: UseButtonGroupProps): {
Component: _heroui_system.As<any>;
children: react.ReactNode;
domRef: react.RefObject<HTMLDivElement>;
context: ContextType;
classNames: string;
getButtonGroupProps: PropGetter<Record<string, unknown>, _heroui_system.DOMAttributes<_heroui_system.DOMElement>>;
};
type UseButtonGroupReturn = ReturnType<typeof useButtonGroup>;
export { ContextType, UseButtonGroupProps, UseButtonGroupReturn, useButtonGroup };