1 | import { type NavigationAction } from '@react-navigation/core';
|
2 | import * as React from 'react';
|
3 | import { type GestureResponderEvent } from 'react-native';
|
4 | export type LinkProps<ParamList extends ReactNavigation.RootParamList, RouteName extends keyof ParamList = keyof ParamList> = ({
|
5 | href?: string;
|
6 | action?: NavigationAction;
|
7 | } & {
|
8 | [Screen in keyof ParamList]: undefined extends ParamList[Screen] ? {
|
9 | screen: Screen;
|
10 | params?: ParamList[Screen];
|
11 | } : {
|
12 | screen: Screen;
|
13 | params: ParamList[Screen];
|
14 | };
|
15 | }[RouteName]) | {
|
16 | href?: string;
|
17 | action: NavigationAction;
|
18 | screen?: undefined;
|
19 | params?: undefined;
|
20 | };
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 | export declare function useLinkProps<ParamList extends ReactNavigation.RootParamList>({ screen, params, href, action, }: LinkProps<ParamList>): {
|
30 | href: string | undefined;
|
31 | accessibilityRole: "link";
|
32 | onPress: (e?: React.MouseEvent<HTMLAnchorElement, MouseEvent> | GestureResponderEvent) => void;
|
33 | };
|
34 |
|
\ | No newline at end of file |