UNPKG

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