import React, { ReactNode } from 'react'; import { Animated, ImageSourcePropType, ViewProps, StyleProp, ViewStyle, TextStyle, ImageStyle, TextInputProps } from 'react-native'; import { HeaderActionComponent, HeaderIcon, IconSource } from '../__types__'; import { $DeepPartial } from '@callstack/react-theme-provider'; export declare type SearchableConfig = { /** * Determines how the search input will be capitalized * * Default: 'none' */ autoCapitalize?: TextInputProps['autoCapitalize']; /** * Determines whether auto-correct is enabled in the search input * * Default: false */ autoCorrect?: boolean; /** * Determines whether the search input will be focused on when it is rendered / opened * * Default: false */ autoFocus?: boolean; /** Icon to override default search icon */ icon?: IconSource; /** Callback for when the text in the search input changes */ onChangeText?: (text: string) => void; /** * Placeholder text for the search input * * Default: 'Search' */ placeholder?: string; }; export declare type HeaderProps = ViewProps & { /** Array of icons / actions to display on the right */ actionItems?: Array; /** * The color used for the background * * Default: Theme.colors.primary */ backgroundColor?: string; /** * An image to blend with the colored background in the header */ backgroundImage?: ImageSourcePropType; /** * Height of the Header when fully collapsed * * Default: 56 */ collapsedHeight?: number; /** * Allow the header to be expanded / collapsed by tapping * * Default: false */ expandable?: boolean; /** * Height of the Header when fully expanded * * Default: 200 */ expandedHeight?: number; /** * Color of the title, subtitle, info, and icons in the header * * Default: Theme.colors.onPrimary */ fontColor?: string; /** Optional header third line of text (hidden when collapsed) */ info?: ReactNode; /** Icon to show to the left of the title, primarily used to trigger the menu / drawer */ icon?: IconSource; /** Callback to execute when the icon is pressed */ onIconPress?: () => void; /** * Y-value of the scroll position of the linked ScrollView (dynamic variant only) */ scrollPosition?: Animated.Value; /** Configuration object for search behavior */ searchableConfig?: SearchableConfig; /** * Renders the header in the expanded state to start * * Default: false */ startExpanded?: boolean; /** Style overrides for internal elements. The styles you provide will be combined with the default styles. */ styles?: { root?: StyleProp; backgroundImage?: StyleProp; component?: StyleProp; content?: StyleProp; icon?: StyleProp; textContent?: StyleProp; title?: StyleProp; subtitle?: StyleProp; info?: StyleProp; search?: StyleProp; actionPanel?: StyleProp; actionItem?: StyleProp; }; /** The text to display on the second line */ subtitle?: ReactNode; /** * Theme value overrides specific to this component. */ theme?: $DeepPartial; /** The test to display on the first line */ title: ReactNode; /** * Callback function to make updates to the linked scrollView (dynamic variant only) */ updateScrollView?: (data: { padding: number | null; animate: boolean; scrollTo: number | null; }) => void; /** * Current resize mode of the Header: * - 'static': Header does not resize based on scroll position, * - 'dynamic' Header resizes based on the provided scrollPosition. * * Default: static */ variant?: 'dynamic' | 'static'; /** * @experimental * * Set to true to use the alternative subtitle styling (larger size, light weight) */ washingtonStyle?: boolean; }; /** * [Header](https://pxblue-components.github.io/react-native/?path=/info/components-documentation--header) component * * The Header is used as the main banner at the top of application screens. It can display page information * via the `title`, `subtitle`, and `info` properties, as well as customizable backgrounds, colors, action items, * and more. The header can be configured to expand / collapse on press or on scroll (when using the [CollapsibleHeaderLayout](https://pxblue-components.github.io/react-native/?path=/info/components-documentation--collapsible-header-layout) component). */ export declare const Header: React.FC;