import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { utils } from 'amos-tool';

class Logo extends Component {
  static propTypes = {
    logo: PropTypes.string,
    text: PropTypes.string,
    showText: PropTypes.bool,
    logoStyle: PropTypes.object
  };

  render() {
    const { logo, text, showText, logoStyle } = this.props;
    return (
      <div className="header-logo">
        <img classnName="logo-img" src={logo} alt="" style={logoStyle} />
        {showText && !utils.isEmpty(text) &&  <div className="logo-text">{text}</div>}
      </div>
    );
  }
}

export default Logo;
