All files / components/Cart index.vue

0% Statements 0/5
0% Branches 0/2
0% Functions 0/1
0% Lines 0/5

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71                                                                                                                                             
<template>
  <div class="container d-flex m-0 p-0">
    <div class="content d-flex flex-column" :class="isOpen && 'open'">
      <div class="header d-flex align-items-center justify-content-between">
        <h6 class="text-uppercase m-0 p-3">Shopping Bag</h6>
        <CloseButton class="mr-3 my-2" v-on:close="$emit('close')" />
      </div>
      <div class="steps">
        <CartDetail v-on:close="$emit('close')"/>
      </div>
    </div>
  </div>
</template>

<script>
import { mapGetters } from "vuex";
import CartDetail from "./CartDetail";
import CloseButton from "@/components/common/CloseButton";
 
export default {
  components: {
    CartDetail,
    CloseButton,
  },
  props: ["isOpen"],
  data: () => ({
    settings: {
      suppressScrollX: true,
      wheelPropagation: false,
    },
  })
};
</script>
 
<style scoped>
@media (max-width: 992px) {
  .container {
    width: 100% !important;
  }
}
 
.icon {
  filter: brightness(0) invert(1);
}
 
.container {
  height: 100%;
  width: max-content;
}
 
.header {
  height: 56px;
}
 
.content {
  min-width: 100%;
  margin-left: 100%;
  height: 100%;
  color: #fff;
  background: #333333;
  transition: all 1s ease-in-out;
}
 
.content.open {
  margin-left: 0;
}
 
.steps {
  height: calc(100% - 56px);
}
</style>