feat(user-profile): smoother height switching (#674)

This commit is contained in:
Konata 2024-09-28 00:22:20 +08:00 committed by GitHub
parent 9239483081
commit e6459a5b63
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -234,7 +234,7 @@ export const UserProfileModalContent: FC<{
<Fragment>
<div
className={cn(
"center m-12 mb-4 flex shrink-0 flex-col",
"center m-12 mb-4 flex shrink-0 flex-col duration-700",
isHeaderSimple ? "mt-3 flex-row" : "flex-col",
)}
>
@ -242,7 +242,7 @@ export const UserProfileModalContent: FC<{
asChild
className={cn("aspect-square", isHeaderSimple ? "size-12" : "size-16")}
>
<m.span layout>
<m.span layout transition={{ duration: 0.35 }}>
<AvatarImage
className="duration-200 animate-in fade-in-0"
asChild
@ -255,6 +255,7 @@ export const UserProfileModalContent: FC<{
</Avatar>
<m.div
layout
transition={{ duration: 0.35 }}
className={cn(
"flex cursor-text select-text flex-col items-center",
isHeaderSimple ? "ml-8 items-start" : "",