-
Notifications
You must be signed in to change notification settings - Fork 0
/
Banner.tsx
31 lines (28 loc) · 984 Bytes
/
Banner.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import QueueAnim from 'rc-queue-anim';
import TweenOne from 'rc-tween-one';
import "./style.css"
import { getChildrenToRender } from '../Home/utils';
import { animType } from '../globalUtils';
import { BannerProps } from '../types';
const Banner = ({ dataSource, ...props }: BannerProps) =>
<div {...props} {...dataSource.wrapper}>
<div {...dataSource.page}>
<QueueAnim
key="text"
type={animType.queue}
leaveReverse
ease={['easeOutQuad', 'easeInQuad']}
{...dataSource.childWrapper}
componentProps={{
md: dataSource.childWrapper.md,
xs: dataSource.childWrapper.xs,
}}
>
{dataSource.childWrapper.children.map(getChildrenToRender)}
</QueueAnim>
<TweenOne animation={animType.one} key="title" {...dataSource.image}>
<img src={dataSource.image.children} width="100%" alt="img" className='shadowImage' />
</TweenOne>
</div>
</div>
export default Banner;