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

47 lines
1.4 KiB
Plaintext

import * as react from 'react';
import { MouseEventHandler } from 'react';
import * as _heroui_system from '@heroui/system';
import { PropGetter, HTMLHeroUIProps } from '@heroui/system';
import { AriaLinkProps } from '@react-types/link';
import { LinkVariantProps } from '@heroui/theme';
import { ReactRef } from '@heroui/react-utils';
interface Props extends HTMLHeroUIProps<"a">, LinkVariantProps {
/**
* Ref to the DOM node.
*/
ref?: ReactRef<HTMLAnchorElement | null>;
/**
* Whether the link is external.
* @default false
*/
isExternal?: boolean;
/**
* Whether to show the icon when the link is external.
* @default false
*/
showAnchorIcon?: boolean;
/**
* The icon to display right after the link.
* @default <LinkIcon />
*/
anchorIcon?: React.ReactNode;
/**
* The native link click event handler.
* use `onPress` instead.
* @deprecated
*/
onClick?: MouseEventHandler<HTMLAnchorElement>;
}
type UseLinkProps = Props & AriaLinkProps;
declare function useLink(originalProps: UseLinkProps): {
Component: _heroui_system.As<any>;
children: react.ReactNode;
anchorIcon: react.ReactNode;
showAnchorIcon: boolean;
getLinkProps: PropGetter<Record<string, unknown>, _heroui_system.DOMAttributes<_heroui_system.DOMElement>>;
};
type UseLinkReturn = ReturnType<typeof useLink>;
export { UseLinkProps, UseLinkReturn, useLink };