aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/ui/effects/Appear.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/ui/effects/Appear.tsx')
-rw-r--r--src/components/ui/effects/Appear.tsx14
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 @@
1import { ReactNode, useEffect, useState } from 'react'; 1import { ReactElement, ReactNode, useEffect, useState } from 'react';
2import { CSSTransitionGroup } from 'react-transition-group'; 2import { CSSTransitionGroup } from 'react-transition-group';
3 3
4type Props = { 4interface IProps {
5 children: ReactNode; 5 children: ReactNode;
6 transitionName: string; 6 transitionName?: string;
7 className?: string; 7 className?: string;
8}; 8}
9const Appear = ({ 9const 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
39Appear.defaultProps = {
40 className: '',
41};
42
43export default Appear; 39export default Appear;