import { NativeStackNavigationOptions } from '@react-navigation/native-stack'; import React, { type ReactNode } from 'react'; import { type ToolbarPlacement } from './context'; export interface StackToolbarProps { /** * Child elements to compose the toolbar. Can include Stack.Toolbar.Button, * Stack.Toolbar.Menu, Stack.Toolbar.View, Stack.Toolbar.Spacer, and * Stack.Toolbar.SearchBarSlot (bottom only) components. */ children?: ReactNode; /** * The placement of the toolbar. * * - `'left'`: Renders items in the left area of the header. * - `'right'`: Renders items in the right area of the header. * - `'bottom'`: Renders items in the bottom toolbar (iOS only). * * @default 'bottom' */ placement?: ToolbarPlacement; /** * When `true`, renders children as a custom component in the header area, * replacing the default header layout. * * Only applies to `placement="left"` and `placement="right"`. * * @default false */ asChild?: boolean; } /** * The component used to configure the stack toolbar. * * - Use `placement="left"` to customize the left side of the header. * - Use `placement="right"` to customize the right side of the header. * - Use `placement="bottom"` (default) to show a bottom toolbar (iOS only). * * If multiple instances of this component are rendered for the same screen, * the last one rendered in the component tree takes precedence. * * > **Note:** Using `Stack.Toolbar` with `placement="left"` or `placement="right"` will * automatically make the header visible (`headerShown: true`), as the toolbar is rendered * as part of the native header. * * > **Note:** `Stack.Toolbar` with `placement="bottom"` can only be used inside **page** * components, not in layout components. * * * @example * ```tsx * import { Stack } from 'expo-router'; * * export default function Layout() { * return ( * * * * alert('Left button pressed!')} /> * * * alert('Right button pressed!')} /> * * * * ); * } * ``` * * @example * ```tsx * import { Stack } from 'expo-router'; * * export default function Page() { * return ( * <> * * alert('Left button pressed!')} /> * * * * {}} /> * * * * * ); * } * ``` * * @experimental * @platform ios */ export declare const StackToolbar: { (props: StackToolbarProps): React.JSX.Element; Button: React.FC; Menu: React.FC; MenuAction: React.FC; SearchBarSlot: React.FC; Spacer: React.FC; View: React.FC; Label: React.FC; Icon: React.FC; Badge: React.FC; }; export declare function appendStackToolbarPropsToOptions(options: NativeStackNavigationOptions, props: StackToolbarProps): NativeStackNavigationOptions; export default StackToolbar; //# sourceMappingURL=StackToolbarClient.d.ts.map