Skip to content

Commit

Permalink
Add transition animation on adding area
Browse files Browse the repository at this point in the history
  • Loading branch information
miyaoka committed Jan 4, 2018
1 parent 592c24d commit 2ec63c3
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions components/GridLayoutContent.vue
@@ -1,12 +1,14 @@
<template>
<section
<transition-group
name="area"
tag="section"
class="grid"
:style="gridStyle"
:class="{ 'is-combinable': isCombinable }"
>
<div
v-for="(area, i) in uniqueAreaKeys"
:key="i"
:key="area"
:style="{'grid-area': area }"
class="grid-cell"
:class="{selected: selectedAreaMap[area]}"
Expand All @@ -27,7 +29,7 @@
@click="combineArea({area})"
>Combine</button>
</div>
</section>
</transition-group>
</template>

<script lang="ts">
Expand Down Expand Up @@ -86,4 +88,13 @@ export default {
.focus-input {
font-size: 20px;
}
.area-enter-active {
transition: .2s ease-out;
}
.area-enter {
opacity: 0.5;
transform: scale(0.2);
}
</style>

0 comments on commit 2ec63c3

Please sign in to comment.