| 1234567891011121314151617181920212223242526272829 |
- import React from "react";
- import {
- TopNavigation,
- TopNavigationAction,
- Icon,
- } from "@ui-kitten/components";
- import * as RootNavigation from "../navigation/RootNavigation";
- const BackIcon = props => <Icon {...props} fill='#fff' name='arrow-back' />;
- export default function NavHeaderBar(props) {
- const {title,back}=props
- const renderBackAction = () => (
- <TopNavigationAction
- icon={BackIcon}
- onPress={() => RootNavigation.goBack()}
- />
- );
- const { accessoryRight } = props;
- return (
- <TopNavigation
- alignment='center'
- title={title}
- accessoryLeft={back !== false && renderBackAction}
- accessoryRight={accessoryRight}
- />
- );
- }
|