UNPKG

expo-router

Version:

Expo Router is a file-based router for React Native and web applications.

37 lines (36 loc) • 1.06 kB
import type { NativeStackHeaderItemCustom } from '../../../../react-navigation/native-stack'; import type { StackToolbarViewProps } from './types'; export type { StackToolbarViewProps, NativeToolbarViewProps } from './types'; /** * A wrapper to render custom content in the toolbar. * * Use inside `Stack.Toolbar` to render a custom React element. * * @example * ```tsx * import { Stack } from 'expo-router'; * import { Text } from 'react-native'; * * function CustomElement() { * return <Text>Custom Element</Text>; * } * * export default function Page() { * return ( * <> * <Stack.Toolbar> * <Stack.Toolbar.View> * <CustomElement /> * </Stack.Toolbar.View> * </Stack.Toolbar> * <ScreenContent /> * </> * ); * } * ``` * * @platform android * @platform ios */ export declare const StackToolbarView: React.FC<StackToolbarViewProps>; export declare function convertStackToolbarViewPropsToRNHeaderItem(props: StackToolbarViewProps): NativeStackHeaderItemCustom | undefined;