import React, { Component } from "react";
import "./header.scss";

class HeaderPage extends Component {
  constructor(props) {
    super(props);
    this.state = {  }
  }

  componentDidMount() {  }

  render() {
    const { width, viewMenu } = this.props.initState

    return (
      <div className="headerPage__container">
        <img alt={'Logo ID'} className="headerPage__img" src="https://tarjeta.id/v1.0.0/img/id.png" />
        <span className="headerPage__title">Editor</span>
        <button
          onClick={() => { this.initsetState({viewMenu: !viewMenu }) }}
          className={`headerPage__btn ${ width <= 700 ? 'headerPage__btn_show' : '' }`}>
          <span><i className="fa fa-eye"></i> Vista previa</span>
        </button>
      </div>
    );
  }

  initsetState(param) {
    this.props.initsetState(param)
    return true
  }

};

export default HeaderPage