<template>
  <transition name="modal">
    <div class="modal-backdrop" @click.self="close()">
      <div
        class="modal"
        role="dialog"
        aria-labelledby="modalTitle"
        aria-describedby="modalDescription"
      >
        <section class="modal-body rounded" id="modalDescription">
          <iframe
            :src="pdfPre"
            width="100%"
            height="100%"
            frameborder="0"
          ></iframe>
        </section>
      </div>
    </div>
  </transition>
</template>

<script>
export default {
  props: ["pdfPre"],
  name: "modal",
  methods: {
    close() {
      this.$emit("close");
    }
  }
};
</script>

<style scoped>
.modal-backdrop {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal {
  background: #ffffff;
  box-shadow: 2px 2px 20px 1px;
  /* overflow-x: auto; */
  display: flex;
  flex-direction: column;
  position: relative;

  width: 90%;
  height: 90%;
}

.modal-body {
  /* position: relative; */
  padding: 20px 10px;
}
</style>
