Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
45 lines
1.7 KiB
Plaintext
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 };
|