<template>
  <div class="pure-image" :style="custStyle" @click="$emit('click')">
    <div />
  </div>
</template>

<script>
export default {
  name: 'PureImage',
  props: {
    bgColor: {
      type: String,
      default: '#f0f0f0'
    },
    bgImage: String
  },
  computed: {
    custStyle() {
      return {
        backgroundColor: this.bgColor,
        backgroundImage: `url('${this.bgImage}')`
      }
    }
  }
}
</script>

<style lang="scss" scoped>
.pure-image {
  background-position: center;
  background-size: 100%;
  background-repeat: no-repeat;
  width: 100%;
  height: 100%;
}
</style>
