Expand toggle
This commit is contained in:
parent
b9e11e7fd2
commit
088800d45f
2 changed files with 65 additions and 11 deletions
|
|
@ -34,7 +34,6 @@ export default {
|
||||||
methods: {},
|
methods: {},
|
||||||
components: {
|
components: {
|
||||||
textBlock,
|
textBlock,
|
||||||
textLink,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,17 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<textBlock
|
<div
|
||||||
customText="Appointment Details"
|
class="row review-toggle flex align-items-center pt-4"
|
||||||
typeStyle="label bold"
|
:class="[isExpanded ? 'expanded' : '']"
|
||||||
justifyText="justify-text-left"
|
@click="toggleIsExpanded">
|
||||||
margin="mt-0"
|
<a
|
||||||
class="dark-header" />
|
aria-label="expand appointment details"
|
||||||
|
href="javascript:void(0)"
|
||||||
<div class="px-4">
|
class="col d-flex justify-content-between py-0">
|
||||||
|
<span class="label">Appointment details</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="review-table px-4">
|
||||||
<vehicleReview cmsWidgetName="VehicleReviewWidget" :vehicle="vehicleInfo" />
|
<vehicleReview cmsWidgetName="VehicleReviewWidget" :vehicle="vehicleInfo" />
|
||||||
|
|
||||||
<hr class="my-0" />
|
<hr class="my-0" />
|
||||||
|
|
@ -60,7 +64,9 @@ export default {
|
||||||
name: "review-dropdown",
|
name: "review-dropdown",
|
||||||
props: {},
|
props: {},
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {
|
||||||
|
isExpanded: false,
|
||||||
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async loadInitialData() {
|
async loadInitialData() {
|
||||||
|
|
@ -78,6 +84,9 @@ export default {
|
||||||
initializeComponent(apiResponses) {
|
initializeComponent(apiResponses) {
|
||||||
this.$refs.servicePackageReview.initializeComponent(apiResponses.servicePackageData);
|
this.$refs.servicePackageReview.initializeComponent(apiResponses.servicePackageData);
|
||||||
},
|
},
|
||||||
|
toggleIsExpanded() {
|
||||||
|
this.isExpanded = !this.isExpanded;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
vehicleInfo() {
|
vehicleInfo() {
|
||||||
|
|
@ -100,7 +109,6 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
textBlock,
|
|
||||||
customerReview,
|
customerReview,
|
||||||
damageReview,
|
damageReview,
|
||||||
scheduleReview,
|
scheduleReview,
|
||||||
|
|
@ -116,4 +124,51 @@ export default {
|
||||||
color: $black;
|
color: $black;
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.review-table {
|
||||||
|
max-height: 0;
|
||||||
|
transition: all 350ms ease-in;
|
||||||
|
overflow: hidden;
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.review-toggle {
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
|
||||||
|
&.expanded {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:after {
|
||||||
|
content: "";
|
||||||
|
transition: all 0.5s ease;
|
||||||
|
background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 8.9' xml:space='preserve'%3e%3cpath d='M8 8.9c-.2 0-.5-.1-.6-.3L.3 1.5C.1 1.4 0 1.1 0 .9 0 .7.1.4.3.3.4.1.7 0 .9 0c.2 0 .5.1.6.3L8 6.7 14.5.2c.1-.1.4-.2.6-.2.2 0 .5.1.6.3s.3.4.3.6c0 .2-.1.5-.3.6L8.6 8.6c-.1.2-.4.3-.6.3z' fill='%231474a2'/%3e%3c/svg%3e");
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: right center;
|
||||||
|
width: 16px;
|
||||||
|
height: 9px;
|
||||||
|
display: inline-flex;
|
||||||
|
position: relative;
|
||||||
|
right: 0.75rem;
|
||||||
|
margin: 0.5rem 0 0.5rem 1rem;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
&.expanded:after {
|
||||||
|
transform: rotate(180deg);
|
||||||
|
}
|
||||||
|
&.expanded + .review-table {
|
||||||
|
max-height: 800px;
|
||||||
|
transition: all 150ms ease-in;
|
||||||
|
overflow: hidden;
|
||||||
|
visibility: visible;
|
||||||
|
}
|
||||||
|
a {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.label {
|
||||||
|
color: $black;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: 1.625;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue