Skip to content

Commit

Permalink
Revert "alias requestAnimationFrame"
Browse files Browse the repository at this point in the history
This reverts commit 3844fdd15e58d88058711fba71be08b643b18279.
  • Loading branch information
fkhadra committed Nov 1, 2022
1 parent 498c169 commit 4952d94
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/utils/collapseToast.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Default, raf } from './constant';
import { Default } from './constant';

/**
* Used to collapse toast after exit animation
Expand All @@ -10,12 +10,12 @@ export function collapseToast(
) {
const { scrollHeight, style } = node;

raf(() => {
requestAnimationFrame(() => {
style.minHeight = 'initial';
style.height = scrollHeight + 'px';
style.transition = `all ${duration}ms`;

raf(() => {
requestAnimationFrame(() => {
style.height = '0';
style.padding = '0';
style.margin = '0';
Expand Down
2 changes: 0 additions & 2 deletions src/utils/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ type KeyOfPosition =

type KeyOfType = 'INFO' | 'SUCCESS' | 'WARNING' | 'ERROR' | 'DEFAULT';

export const raf = requestAnimationFrame

/**
* @deprecated
*/
Expand Down

0 comments on commit 4952d94

Please sign in to comment.