import * as React from 'react' import styled, { useTheme } from 'styled-components/native' import { OButton, OIcon, OText } from '../shared' import { TextStyle } from 'react-native' const Wrapper = styled.View` background-color: ${(props: any) => props.theme.colors.white}; padding: 10px 20px 20px 0px; flex-direction: row; justify-content: center; align-items: center; position: relative; ` const TitleWrapper = styled.View` flex-direction: column; padding-horizontal: 10px; ` const TitleTopWrapper = styled.View` flex-grow: 1; flex-direction: row; align-items: center; ` const btnBackArrow = { borderWidth: 0, backgroundColor: '#FFF', borderColor: '#FFF', shadowColor: '#FFF' } interface Props { navigation?: any, route?: any, title?: string, subTitle?: any, titleColor?: string, titleAlign?: any, withIcon?: boolean, icon?: any, leftImg?: any, isBackStyle?: boolean, onActionLeft?: () => void, onRightAction?: () => void, showCall?: boolean, titleStyle?: TextStyle, btnStyle?: TextStyle, style?: TextStyle, paddingTop?: number, } const NavBar = (props: Props) => { const theme = useTheme() const goSupport = () => { props.navigation.navigate('Supports', {}); } return ( {props.withIcon ? ( ) : null } {props.title || ''} {props.subTitle ? (props.subTitle) : null } { props.showCall ? () : null } ) } NavBar.defaultProps = { title: '', textAlign: 'center' }; export default NavBar;