refactor(client): use css modules
This commit is contained in:
parent
1e5d4db0a1
commit
c84d86b368
|
@ -1,8 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="mk-toast">
|
<div>
|
||||||
<Transition :name="$store.state.animation ? 'toast' : ''" appear @after-leave="emit('closed')">
|
<Transition
|
||||||
<div v-if="showing" class="body _acrylic" :style="{ zIndex }">
|
:enter-active-class="$store.state.animation ? $style.transition_toast_enterActive : ''"
|
||||||
<div class="message">
|
:leave-active-class="$store.state.animation ? $style.transition_toast_leaveActive : ''"
|
||||||
|
:enter-from-class="$store.state.animation ? $style.transition_toast_enterFrom : ''"
|
||||||
|
:leave-to-class="$store.state.animation ? $style.transition_toast_leaveTo : ''"
|
||||||
|
appear @after-leave="emit('closed')"
|
||||||
|
>
|
||||||
|
<div v-if="showing" class="_acrylic" :class="$style.root" :style="{ zIndex }">
|
||||||
|
<div style="padding: 16px 24px;">
|
||||||
{{ message }}
|
{{ message }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -32,17 +38,18 @@ onMounted(() => {
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" module>
|
||||||
.toast-enter-active, .toast-leave-active {
|
.transition_toast_enterActive,
|
||||||
|
.transition_toast_leaveActive {
|
||||||
transition: opacity 0.3s, transform 0.3s !important;
|
transition: opacity 0.3s, transform 0.3s !important;
|
||||||
}
|
}
|
||||||
.toast-enter-from, .toast-leave-to {
|
.transition_toast_enterFrom,
|
||||||
|
.transition_toast_leaveTo {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transform: translateY(-100%);
|
transform: translateY(-100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.mk-toast {
|
> .root {
|
||||||
> .body {
|
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
@ -57,10 +64,5 @@ onMounted(() => {
|
||||||
overflow: clip;
|
overflow: clip;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
|
||||||
> .message {
|
|
||||||
padding: 16px 24px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue