UNPKG

@prosperitainova/dumbo-react-native

Version:
50 lines 2.29 kB
import React from 'react'; import { ViewProps, StyleProp, ViewStyle } from 'react-native'; import type { NavigationButton } from '../../types/navigation'; import { LinkProps } from '../Link'; import { StylePassing } from 'src/types/shared'; export declare const headerBarGetItems: (items: NavigationButton[], style: StylePassing, itemStyle: StylePassing, type: "right" | "left", forceDarkMode?: boolean) => React.ReactNode; /** Props for TopNavigationBar component */ export type TopNavigationBarProps = { /** Title to show */ title: string; /** Sub title to use */ subTitle?: string; /** Indicate if header mode for title should be used (larger page header) */ headerMode?: boolean; /** Left link to load */ leftLink?: LinkProps; /** Left navigation items to load (will not be loaded if leftLink is used). Do not use more than 2 or can get funky looking. */ leftItems?: NavigationButton[]; /** Right link to load */ rightLink?: LinkProps; /** Right navigation items to load (will not be loaded if rightLink is used). Do not use more than 2 or can get funky looking. */ rightItems?: NavigationButton[]; /** Additional components to load into the header (useful for like Search or tabs) */ additionalHeaderContent?: React.ReactNode; /** Style to set on the item */ style?: StyleProp<ViewStyle>; /** Direct props to set on the React Native component (including iOS and Android specific props). Most use cases should not need this. */ componentProps?: ViewProps; }; /** * TopNavigationBar component for rendering a navigation bar at the top of the page (with title and actions) * * {@link https://github.com/carbon-design-system/carbon-react-native/blob/main/example/src/Views/TopNavigationBar.tsx | Example code} */ export declare class TopNavigationBar extends React.Component<TopNavigationBarProps> { state: { leftLinkWidth: number; rightLinkWidth: number; }; private get styles(); private getLeftLinkLayout; private getRightLinkLayout; private get headerTitleArea(); private get baseHeader(); private get pageHeader(); private get additionalContent(); private get mainView(); render(): React.ReactNode; } //# sourceMappingURL=index.d.ts.map