fix(link): deprecated onClick warning on using onPress (#3569)

* fix(navbar): fixed the height when style h-full

* fix(navbar): fixed the height when style h-full

* fix(link): deprecated onClick warning on using onPress

* refactor(link): add comment

* chore(changeset): revise changeset message

---------

Co-authored-by: WK Wong <wingkwong.code@gmail.com>
This commit is contained in:
Abhinandan 2024-08-29 10:23:23 +05:30 committed by GitHub
parent 9d6bcb580a
commit 3c0a486cea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View File

@ -0,0 +1,5 @@
---
"@nextui-org/link": patch
---
use `@nextui-org/use-aria-link` to suppress onClick deprecation warning (#3196)

View File

@ -2,7 +2,7 @@ import type {AriaLinkProps} from "@react-types/link";
import type {LinkVariantProps} from "@nextui-org/theme";
import {link} from "@nextui-org/theme";
import {useLink as useAriaLink} from "@react-aria/link";
import {useAriaLink} from "@nextui-org/use-aria-link";
import {
HTMLNextUIProps,
mapPropsVariants,
@ -67,6 +67,7 @@ export function useLink(originalProps: UseLinkProps) {
const disableAnimation =
originalProps?.disableAnimation ?? globalContext?.disableAnimation ?? false;
// use `@nextui-org/use-aria-link` to suppress onClick deprecation warning
const {linkProps} = useAriaLink(
{
...otherProps,