mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
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:
parent
9d6bcb580a
commit
3c0a486cea
5
.changeset/red-ducks-greet.md
Normal file
5
.changeset/red-ducks-greet.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"@nextui-org/link": patch
|
||||
---
|
||||
|
||||
use `@nextui-org/use-aria-link` to suppress onClick deprecation warning (#3196)
|
||||
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user