import React from "react";
import PropTypes from "prop-types";
import styles from "./DocsViewer.module.css";

export default function DocsHeader(props) {
  return (
    <div className={styles.header}>
      <div className={styles.header__title}>
        <h1 className={styles.header__title_label}>{props.title}</h1>
        <div className={styles.header__img_label}>
          <img
            className={styles.header__img}
            src={props.picUrl}
            role="img"
            width="150px"
            height="auto"
          />
        </div>
      </div>
      <p className={styles.header__description}>{props.description}</p>
    </div>
  );
}

DocsHeader.propTypes = {
  title: PropTypes.string,
  picUrl: PropTypes.string
};
