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

54 lines
1.5 KiB
Plaintext

import * as react from 'react';
import { Ref } from 'react';
import { HTMLHeroUIProps, PropGetter } from '@heroui/system';
import { PressEvent, LinkDOMProps } from '@react-types/shared';
import { PaginationItemValue } from '@heroui/use-pagination';
interface Props extends Omit<HTMLHeroUIProps<"li">, "onClick"> {
/**
* Ref to the DOM node.
*/
ref?: Ref<HTMLElement>;
/**
* Value of the item.
*/
value?: PaginationItemValue;
/**
* Whether the item is active.
* @default false
*/
isActive?: boolean;
/**
* Whether the item is disabled.
* @default false
*/
isDisabled?: boolean;
/**
* Callback fired when the item is clicked.
* @param e MouseEvent
* @deprecated Use `onPress` instead.
*/
onClick?: HTMLHeroUIProps<"li">["onClick"];
/**
* Callback fired when the item is clicked.
* @param e PressEvent
*/
onPress?: (e: PressEvent) => void;
/**
* Function to get the aria-label of the item.
*/
getAriaLabel?: (page?: PaginationItemValue) => string | undefined;
}
type UsePaginationItemProps = Props & LinkDOMProps;
declare function usePaginationItem(props: UsePaginationItemProps): {
Component: string;
children: react.ReactNode;
ariaLabel: string | undefined;
isFocused: boolean;
isFocusVisible: boolean;
getItemProps: PropGetter;
};
type UsePaginationItemReturn = ReturnType<typeof usePaginationItem>;
export { type UsePaginationItemProps, type UsePaginationItemReturn, usePaginationItem };