IO-1816 Refactor main page.
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import React from 'react';
|
||||
import { Button } from 'antd';
|
||||
import { DownOutlined } from '@ant-design/icons';
|
||||
import QueueAnim from 'rc-queue-anim';
|
||||
import TweenOne from 'rc-tween-one';
|
||||
import { isImg } from './utils';
|
||||
import React from "react";
|
||||
import { Button, Space } from "antd";
|
||||
import { DownOutlined } from "@ant-design/icons";
|
||||
import QueueAnim from "rc-queue-anim";
|
||||
import TweenOne from "rc-tween-one";
|
||||
import { isImg } from "./utils";
|
||||
|
||||
class Banner extends React.PureComponent {
|
||||
render() {
|
||||
@@ -15,12 +15,12 @@ class Banner extends React.PureComponent {
|
||||
<div {...currentProps} {...dataSource.wrapper}>
|
||||
<QueueAnim
|
||||
key="QueueAnim"
|
||||
type={['bottom', 'top']}
|
||||
type={["bottom", "top"]}
|
||||
delay={200}
|
||||
{...dataSource.textWrapper}
|
||||
>
|
||||
<div key="title" {...dataSource.title}>
|
||||
{typeof dataSource.title.children === 'string' &&
|
||||
{typeof dataSource.title.children === "string" &&
|
||||
dataSource.title.children.match(isImg) ? (
|
||||
<img src={dataSource.title.children} width="100%" alt="img" />
|
||||
) : (
|
||||
@@ -30,13 +30,18 @@ class Banner extends React.PureComponent {
|
||||
<div key="content" {...dataSource.content}>
|
||||
{dataSource.content.children}
|
||||
</div>
|
||||
<Button ghost key="button" {...dataSource.button}>
|
||||
{dataSource.button.children}
|
||||
</Button>
|
||||
<Space wrap>
|
||||
<Button ghost key="button" {...dataSource.button}>
|
||||
{dataSource.button.children}
|
||||
</Button>
|
||||
<Button type="primary" key="button2" {...dataSource.button2}>
|
||||
{dataSource.button2.children}
|
||||
</Button>
|
||||
</Space>
|
||||
</QueueAnim>
|
||||
<TweenOne
|
||||
animation={{
|
||||
y: '-=20',
|
||||
y: "-=20",
|
||||
yoyo: true,
|
||||
repeat: -1,
|
||||
duration: 1000,
|
||||
|
||||
Reference in New Issue
Block a user