You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
794 B
24 lines
794 B
import React from 'react';
|
|
import { Appbar } from 'react-native-paper';
|
|
|
|
interface TopBarProps{
|
|
title : string
|
|
isVisible : boolean
|
|
}
|
|
|
|
export default function TopBar(props) {
|
|
const _handleSearch = () => console.log('Searching');
|
|
const _handleMore = () => console.log('Shown more');
|
|
|
|
return (
|
|
<Appbar.Header style={{backgroundColor: '#F2F0E4'}} >
|
|
<Appbar.BackAction onPress={_goBack} color={"#3F3C42"}/>
|
|
<Appbar.Content title={props.title} color={"#3F3C42"}/>
|
|
{props.isVisible &&(
|
|
<><Appbar.Action icon="magnify" onPress={_handleSearch} color={"#3F3C42"}/>
|
|
<Appbar.Action icon="dots-vertical" onPress={_handleMore} color={"#3F3C42"}/>
|
|
</>
|
|
)}
|
|
</Appbar.Header>
|
|
);
|
|
} |