From 4ae25d7698193a54803370d787961157fbfbbff1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Viricel?= Date: Wed, 28 Oct 2020 18:55:46 +0100 Subject: [PATCH] WL-25 Add transition on grid items --- components/Grid.vue | 97 +++++++++++++++++++++++++++------------------ package.json | 1 + 2 files changed, 60 insertions(+), 38 deletions(-) diff --git a/components/Grid.vue b/components/Grid.vue index 1cac40d..e25ec13 100644 --- a/components/Grid.vue +++ b/components/Grid.vue @@ -1,44 +1,47 @@ @@ -101,6 +108,20 @@ export default { object-fit: cover; } +.grid-item { + transition: all 1s; +} + +.flip-grid-enter, +.flip-grid-leave-to { + opacity: 0; + transform: translateY(30px); +} + +.flip-grid-leave-active { + position: absolute; +} + .btn { @apply inline-block border rounded py-1 px-3; } diff --git a/package.json b/package.json index c29ebad..45a7ffc 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "dependencies": { "axios": "^0.21.0", "core-js": "^3.6.5", + "lodash": "^4.17.20", "nuxt": "^2.14.6" }, "devDependencies": {