Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Commit

Permalink
Reflect kaizumaki/covid19:feature/pr-5443
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdmaster committed Sep 29, 2020
1 parent 0f08d8a commit 78b7531
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions components/cards/CardRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ const options: ThisTypedComponentOptionsWithRecordProps<
const [self, side] = this.cardElements
if (self) {
self.style.height = ''
self.style.maxHeight = ''
self.dataset.height = `${self.offsetHeight}`
}
if (side) {
side.style.height = ''
side.style.maxHeight = ''
side.dataset.height = `${side.offsetHeight}`
}
},
Expand All @@ -61,10 +61,10 @@ const options: ThisTypedComponentOptionsWithRecordProps<
self.dataset.height = self.dataset.height || `${self.offsetHeight}`
side.dataset.height = side.dataset.height || `${side.offsetHeight}`
self.style.height =
self.style.height === 'auto' ? `${self.dataset.height}px` : 'auto'
side.style.height =
side.style.height === 'auto' ? 'auto' : `${side.dataset.height}px`
self.style.maxHeight =
self.style.maxHeight === '100%' ? `${self.dataset.height}px` : '100%'
side.style.maxHeight =
side.style.maxHeight === '100%' ? '100%' : `${side.dataset.height}px`
},
},
computed: {
Expand Down Expand Up @@ -98,3 +98,9 @@ const options: ThisTypedComponentOptionsWithRecordProps<
export default Vue.extend(options)
</script>

<style lang="scss">
.DataCard {
transition: max-height 0.3s;
}
</style>

0 comments on commit 78b7531

Please sign in to comment.