Skip to content

Commit

Permalink
Add transition to chat messages
Browse files Browse the repository at this point in the history
  • Loading branch information
olzhasar committed Mar 12, 2024
1 parent a5ccbea commit 5420d8c
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions frontend/src/pages/Chat.vue
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,16 @@ const notifyStopTyping = () => {
id="messageList"
class="overflow-y-scroll flex-grow pr-2 space-y-2 no-scrollbar"
>
<div v-for="msg in messages">
<MessageDiv :msg="msg" />
</div>
<TransitionGroup
tag="div"
enter-from-class="opacity-0 -translate-x-10"
enter-to-class="opacity-100 translate-x-0"
enter-active-class="duration-200 ease-in transform"
>
<div v-for="(msg, index) in messages" :key="index">
<MessageDiv :msg="msg" />
</div>
</TransitionGroup>

<div v-if="personTyping" class="chat chat-start">
<div class="opacity-60 chat-footer">
Expand Down

0 comments on commit 5420d8c

Please sign in to comment.