import * as React from 'react' import {View} from "react-native"; import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons' import Ripple from 'react-native-material-ripple'; import {ReactNode} from "react"; // Styles interface MaterialToolbarProps { color?: string, onLeftIconPress?():void, onRightIconPress?():void, content?():ReactNode iconsColor?:string, leftIcon?:string, rightIcon?:string } interface MaterialToolbarState { } export default class MaterialToolbar extends React.Component { constructor(props) { super(props); } static defaultProps = { color: '#eeeeee', onLeftIconPress:()=>{}, onRightIconPress:()=>{}, iconsColor:'#212121' }; render() { return ( {this.props.leftIcon && this.props.onLeftIconPress()} style={{borderRadius:28,overflow:'hidden',width:56,height:56,alignItems:'center',justifyContent:'center'}}> } {this.props.content && this.props.content() } {this.props.rightIcon && this.props.onRightIconPress()} style={{borderRadius:28,overflow:'hidden',width:56,height:56,alignItems:'center',justifyContent:'center'}}> } ) } }