expo-router
Version:
Expo Router is a file-based router for React Native and web applications.
45 lines (44 loc) • 1.3 kB
TypeScript
import type { NativeStackHeaderItemButton } from '../../../../react-navigation/native-stack';
import type { StackToolbarButtonProps } from './types';
export type { StackToolbarButtonProps, NativeToolbarButtonProps } from './types';
/**
* A button used inside `Stack.Toolbar`.
*
* @example
* ```tsx
* import { Stack } from 'expo-router';
*
* export default function Layout() {
* return (
* <Stack>
* <Stack.Screen name="index">
* <Stack.Toolbar placement="left">
* <Stack.Toolbar.Button icon="arrow.left.circle" onPress={() => alert('Left pressed')} />
* </Stack.Toolbar>
* </Stack.Screen>
* </Stack>
* );
* }
* ```
*
* @example
* ```tsx
* import { Stack } from 'expo-router';
*
* export default function Page() {
* return (
* <>
* <Stack.Toolbar placement="left">
* <Stack.Toolbar.Button icon="arrow.left.circle" onPress={() => alert('Left pressed')} />
* </Stack.Toolbar>
* <ScreenContent />
* </>
* );
* }
* ```
*
* @platform android
* @platform ios
*/
export declare const StackToolbarButton: React.FC<StackToolbarButtonProps>;
export declare function convertStackToolbarButtonPropsToRNHeaderItem(props: StackToolbarButtonProps): NativeStackHeaderItemButton | undefined;