Commit a0a19cd7 authored by NGPixel's avatar NGPixel

feat: improved modal animations

parent 3cb53bd1
<template lang="pug">
.modal(v-bind:class='{ "is-active": isShown }')
.modal-background
transition(:duration="400")
.modal(v-show='isShown', v-cloak)
transition(name='modal-background')
.modal-background(v-show='isShown')
.modal-container
.modal-content
transition(name='modal-content')
.modal-content(v-show='isShown')
header.is-blue
span Copy link to this section
section
......
<template lang="pug">
.modal(v-bind:class='{ "is-active": isShown }')
.modal-background
transition(:duration="400")
.modal(v-show='isShown', v-cloak)
transition(name='modal-background')
.modal-background(v-show='isShown')
.modal-container
.modal-content
transition(name='modal-content')
.modal-content(v-show='isShown')
header.is-light-blue Create New Document
section
label.label Enter the new document path:
......
<template lang="pug">
.modal(v-bind:class='{ "is-active": isShown }')
.modal-background
transition(:duration="400")
.modal(v-show='isShown', v-cloak)
transition(name='modal-background')
.modal-background(v-show='isShown')
.modal-container
.modal-content
transition(name='modal-content')
.modal-content(v-show='isShown')
header.is-indigo Move document
section
label.label Enter the new document path:
......
.modal {
align-items: flex-start;
display: none;
&.is-active {
display: block;
}
&.is-superimposed {
.modal-background {
......@@ -23,8 +19,15 @@
height: 100vh;
position: fixed;
background-color: rgba(0,0,0,0.85);
animation: .4s ease fadeIn;
z-index: 10;
&-enter-active {
animation: .4s ease fadeIn;
}
&-leave-active {
animation: .4s ease fadeOut;
}
}
.modal-container {
position: fixed;
......@@ -38,10 +41,16 @@
align-items: center;
}
.modal-content {
animation: .3s ease zoomIn;
width: 600px;
background-color: #FFF;
&-enter-active {
animation: .3s ease zoomIn;
}
&-leave-active {
animation: .3s ease zoomOut;
}
&.is-expanded {
align-self: stretch;
width: 100%;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment