diff options
Diffstat (limited to 'src/components/ui/effects/Appear.tsx')
-rw-r--r-- | src/components/ui/effects/Appear.tsx | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/components/ui/effects/Appear.tsx b/src/components/ui/effects/Appear.tsx index 416017c83..bf097b6a6 100644 --- a/src/components/ui/effects/Appear.tsx +++ b/src/components/ui/effects/Appear.tsx | |||
@@ -1,16 +1,16 @@ | |||
1 | import { ReactNode, useEffect, useState } from 'react'; | 1 | import { ReactElement, ReactNode, useEffect, useState } from 'react'; |
2 | import { CSSTransitionGroup } from 'react-transition-group'; | 2 | import { CSSTransitionGroup } from 'react-transition-group'; |
3 | 3 | ||
4 | type Props = { | 4 | interface IProps { |
5 | children: ReactNode; | 5 | children: ReactNode; |
6 | transitionName: string; | 6 | transitionName?: string; |
7 | className?: string; | 7 | className?: string; |
8 | }; | 8 | } |
9 | const Appear = ({ | 9 | const Appear = ({ |
10 | children, | 10 | children, |
11 | transitionName = 'fadeIn', | 11 | transitionName = 'fadeIn', |
12 | className = '', | 12 | className = '', |
13 | }: Props) => { | 13 | }: IProps): ReactElement | null => { |
14 | const [mounted, setMounted] = useState(false); | 14 | const [mounted, setMounted] = useState(false); |
15 | 15 | ||
16 | useEffect(() => { | 16 | useEffect(() => { |
@@ -36,8 +36,4 @@ const Appear = ({ | |||
36 | ); | 36 | ); |
37 | }; | 37 | }; |
38 | 38 | ||
39 | Appear.defaultProps = { | ||
40 | className: '', | ||
41 | }; | ||
42 | |||
43 | export default Appear; | 39 | export default Appear; |