UNPKG

@react-navigation/native

Version:

React Native integration for React Navigation

43 lines (42 loc) 1.22 kB
import { getStateFromPath as getStateFromPathDefault, getPathFromState as getPathFromStateDefault } from '@react-navigation/core'; export declare type Theme = { dark: boolean; colors: { primary: string; background: string; card: string; text: string; border: string; }; }; export declare type LinkingOptions = { /** * The prefixes are stripped from the URL before parsing them. * Usually they are the `scheme` + `host` (e.g. `myapp://chat?user=jane`) * Only applicable on Android and iOS. */ prefixes: string[]; /** * Config to fine-tune how to parse the path. * * Example: * ```js * { * Chat: { * path: 'chat/:author/:id', * parse: { id: Number } * } * } * ``` */ config?: Parameters<typeof getStateFromPathDefault>[1]; /** * Custom function to parse the URL to a valid navigation state (advanced). * Only applicable on Web. */ getStateFromPath?: typeof getStateFromPathDefault; /** * Custom function to convert the state object to a valid URL (advanced). */ getPathFromState?: typeof getPathFromStateDefault; };