Files
Fluxup_PAP/node_modules/expo-router/build/layouts/stack-utils/toolbar/shared.d.ts
2026-03-10 16:18:05 +00:00

49 lines
2.3 KiB
TypeScript

import type { NativeStackHeaderItemButton } from '@react-navigation/native-stack';
import { type ReactNode } from 'react';
import { type ColorValue, type ImageSourcePropType, type StyleProp } from 'react-native';
import type { SFSymbol } from 'sf-symbols-typescript';
import { type BasicTextStyle } from '../../../utils/font';
export interface StackHeaderItemSharedProps {
children?: ReactNode;
style?: StyleProp<BasicTextStyle>;
hidesSharedBackground?: boolean;
separateBackground?: boolean;
accessibilityLabel?: string;
accessibilityHint?: string;
disabled?: boolean;
tintColor?: ColorValue;
icon?: SFSymbol | ImageSourcePropType;
/**
* Controls how image-based icons are rendered on iOS.
*
* - `'template'`: iOS applies tint color to the icon
* - `'original'`: Preserves original icon colors (useful for multi-color icons)
*
* **Default behavior:**
* - If `tintColor` is specified, defaults to `'template'`
* - If no `tintColor`, defaults to `'original'`
*
* This prop only affects image-based icons (not SF Symbols).
*
* @see [Apple documentation](https://developer.apple.com/documentation/uikit/uiimage/renderingmode-swift.enum) for more information.
*
* @platform ios
*/
iconRenderingMode?: 'template' | 'original';
/**
* @default 'plain'
*/
variant?: 'plain' | 'done' | 'prominent';
}
type RNSharedHeaderItem = Pick<NativeStackHeaderItemButton, 'label' | 'labelStyle' | 'icon' | 'variant' | 'tintColor' | 'disabled' | 'width' | 'hidesSharedBackground' | 'sharesBackground' | 'identifier' | 'badge' | 'accessibilityLabel' | 'accessibilityHint'>;
/** @internal */
export declare function extractXcassetName(props: StackHeaderItemSharedProps): string | undefined;
/**
* Extracts the rendering mode from the Icon child component (for `src` and `xcasset` variants).
* Returns undefined if no explicit rendering mode is set on the Icon child.
* @internal
*/
export declare function extractIconRenderingMode(props: StackHeaderItemSharedProps): 'template' | 'original' | undefined;
export declare function convertStackHeaderSharedPropsToRNSharedHeaderItem(props: StackHeaderItemSharedProps, isBottomPlacement?: boolean): RNSharedHeaderItem;
export {};
//# sourceMappingURL=shared.d.ts.map