change reaction remove animation
This commit is contained in:
parent
566ac6dfa6
commit
c4bf52ab7f
2 changed files with 18 additions and 6 deletions
|
|
@ -64,6 +64,7 @@ export const ReactionText = style([
|
|||
lineHeight: toRem(20),
|
||||
},
|
||||
]);
|
||||
|
||||
const scaleAnimation = keyframes({
|
||||
'0%': {
|
||||
transform: 'scale(1)',
|
||||
|
|
@ -76,7 +77,22 @@ const scaleAnimation = keyframes({
|
|||
},
|
||||
});
|
||||
export const ReactionChangeAnimation = style({
|
||||
animation: `${scaleAnimation} 1000ms ease-in-out infinite`,
|
||||
animation: `${scaleAnimation} 700ms ease-in-out infinite`,
|
||||
});
|
||||
|
||||
const dropAnimation = keyframes({
|
||||
'0%': {
|
||||
transform: 'translateY(0)',
|
||||
},
|
||||
'50%': {
|
||||
transform: 'translateY(0.1em)',
|
||||
},
|
||||
'100%': {
|
||||
transform: 'translateY(0)',
|
||||
},
|
||||
});
|
||||
export const ReactionDropAnimation = style({
|
||||
animation: `${dropAnimation} 700ms ease-in-out infinite`,
|
||||
});
|
||||
|
||||
export const ReactionImg = style([
|
||||
|
|
|
|||
|
|
@ -47,11 +47,7 @@ export const Reaction = as<
|
|||
</Text>
|
||||
)}
|
||||
</Text>
|
||||
<Text
|
||||
className={classNames({ [css.ReactionChangeAnimation]: removing })}
|
||||
as="span"
|
||||
size="T300"
|
||||
>
|
||||
<Text className={classNames({ [css.ReactionDropAnimation]: removing })} as="span" size="T300">
|
||||
{count}
|
||||
</Text>
|
||||
</Box>
|
||||
|
|
|
|||
Loading…
Reference in a new issue