This repository has been archived by the owner on Aug 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 238
/
Footer.tsx
67 lines (60 loc) · 1.45 KB
/
Footer.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import { CopyrightOutlined, GithubOutlined } from '@ant-design/icons';
import { Layout } from 'antd';
import React, { Fragment, CSSProperties } from 'react';
import GlobalFooter from './GlobalFooter';
import { WithFalse } from './typings';
const { Footer } = Layout;
const defaultLinks = [
{
key: 'Ant Design Pro',
title: 'Ant Design Pro',
href: 'https://pro.ant.design',
blankTarget: true,
},
{
key: 'github',
title: <GithubOutlined />,
href: 'https://github.com/ant-design/ant-design-pro',
blankTarget: true,
},
{
key: 'Ant Design',
title: 'Ant Design',
href: 'https://ant.design',
blankTarget: true,
},
];
const defaultCopyright = '2019 蚂蚁金服体验技术部出品';
export interface FooterProps {
links?: WithFalse<
{
key?: string;
title: React.ReactNode;
href: string;
blankTarget?: boolean;
}[]
>;
copyright?: WithFalse<String>;
style?: CSSProperties;
className?: string;
}
const FooterView: React.FC<FooterProps> = ({
links,
copyright,
style,
className,
}: FooterProps) => (
<Footer className={className} style={{ padding: 0, ...style }}>
<GlobalFooter
links={links !== undefined ? links : defaultLinks}
copyright={
copyright === false ? null : (
<Fragment>
Copyright <CopyrightOutlined /> {copyright || defaultCopyright}
</Fragment>
)
}
/>
</Footer>
);
export default FooterView;