UNPKG

1.12 kBTypeScriptView Raw
1import type { NavigationAction } from '@react-navigation/core';
2import * as React from 'react';
3import { GestureResponderEvent, Text, TextProps } from 'react-native';
4import type { To } from './useLinkTo';
5type Props<ParamList extends ReactNavigation.RootParamList> = {
6 to: To<ParamList>;
7 action?: NavigationAction;
8 target?: string;
9 onPress?: (e: React.MouseEvent<HTMLAnchorElement, MouseEvent> | GestureResponderEvent) => void;
10} & (Omit<TextProps, 'disabled'> & {
11 disabled?: boolean | null;
12 children: React.ReactNode;
13});
14/**
15 * Component to render link to another screen using a path.
16 * Uses an anchor tag on the web.
17 *
18 * @param props.to Absolute path to screen (e.g. `/feeds/hot`).
19 * @param props.action Optional action to use for in-page navigation. By default, the path is parsed to an action based on linking config.
20 * @param props.children Child elements to render the content.
21 */
22export default function Link<ParamList extends ReactNavigation.RootParamList>({ to, action, ...rest }: Props<ParamList>): React.CElement<TextProps, Text>;
23export {};
24//# sourceMappingURL=Link.d.ts.map
\No newline at end of file