Skip to content

Commit 31aa5d1

Browse files
committed
Initial commit
0 parents  commit 31aa5d1

23 files changed

+1917
-0
lines changed

.editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# top-most EditorConfig file
2+
root = true
3+
4+
# Unix-style newlines with a newline ending every file
5+
[*.{js,css,md}]
6+
end_of_line = lf
7+
insert_final_newline = true
8+
indent_style = space
9+
indent_size = 2

.eslintrc.js

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const base = require('@umijs/fabric/dist/eslint');
2+
3+
module.exports = {
4+
...base,
5+
rules: {
6+
...base.rules,
7+
'no-template-curly-in-string': 0,
8+
'prefer-promise-reject-errors': 0,
9+
'react/no-array-index-key': 0,
10+
'react/sort-comp': 0,
11+
'@typescript-eslint/no-explicit-any': 0,
12+
},
13+
};

.fatherrc.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export default {
2+
cjs: 'babel',
3+
esm: { type: 'babel', importLibToEs: true },
4+
preCommit: {
5+
eslint: true,
6+
prettier: true,
7+
},
8+
};

.gitignore

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
.storybook
2+
*.iml
3+
*.log
4+
.idea/
5+
.ipr
6+
.iws
7+
*~
8+
~*
9+
*.diff
10+
*.patch
11+
*.bak
12+
.DS_Store
13+
Thumbs.db
14+
.project
15+
.*proj
16+
.svn/
17+
*.swp
18+
*.swo
19+
*.pyc
20+
*.pyo
21+
.build
22+
node_modules
23+
.cache
24+
assets/**/*.css
25+
build
26+
lib
27+
es
28+
yarn.lock
29+
package-lock.json
30+
coverage/
31+
.doc

.npmignore

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
build/
2+
*.cfg
3+
nohup.out
4+
*.iml
5+
.idea/
6+
.ipr
7+
.iws
8+
*~
9+
~*
10+
*.diff
11+
*.log
12+
*.patch
13+
*.bak
14+
.DS_Store
15+
Thumbs.db
16+
.project
17+
.*proj
18+
.svn/
19+
*.swp
20+
out/
21+
.build
22+
node_modules
23+
.cache
24+
examples
25+
tests
26+
src
27+
/index.js
28+
.*
29+
assets/**/*.less

.prettierignore

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.storybook
2+
node_modules
3+
lib
4+
es
5+
.cache
6+
package.json
7+
package-lock.json
8+
public
9+
.site
10+
_site
11+
.umi
12+
.doc

.prettierrc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"endOfLine": "lf",
3+
"semi": true,
4+
"singleQuote": true,
5+
"tabWidth": 2,
6+
"trailingComma": "all"
7+
}

.travis.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
language: node_js
2+
3+
node_js:
4+
- 10
5+
6+
script:
7+
- |
8+
if [ "$TEST_TYPE" = test ]; then
9+
npm run coverage && \
10+
bash <(curl -s https://codecov.io/bash)
11+
else
12+
npm run $TEST_TYPE
13+
fi
14+
env:
15+
matrix:
16+
- TEST_TYPE=lint
17+
- TEST_TYPE=test

HISTORY.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
## 0.6.0
2+
3+
- support `maxColumnsPerRow`.
4+
5+
## 0.5.0
6+
7+
- support `theme="dark|light"`.
8+
9+
## 0.4.0
10+
11+
- support `columnLayout`.
12+
- support `backgroundColor`.
13+
14+
## 0.3.0
15+
16+
- support `style` and `className` for footer column and footer item.
17+
- support `LinkComponent` for footer item.
18+
19+
## 0.2.0
20+
21+
- Fix `lib` and `es` folders missing.
22+
23+
## 0.1.0
24+
25+
- First release.

LICENSE.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2019-present afc163
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6+
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

+107
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# rc-footer 🐾
2+
3+
[![NPM version][npm-image]][npm-url]
4+
[![build status][travis-image]][travis-url]
5+
[![Codecov][codecov-image]][codecov-url]
6+
[![david deps][david-image]][david-url]
7+
[![david devDeps][david-dev-image]][david-dev-url]
8+
[![npm download][download-image]][download-url]
9+
10+
[npm-image]: http://img.shields.io/npm/v/rc-footer.svg?style=flat-square
11+
[npm-url]: http://npmjs.org/package/rc-footer
12+
[travis-image]: https://img.shields.io/travis/com/react-component/footer.svg?style=flat-square
13+
[travis-url]: https://travis-ci.com/react-component/footer
14+
[codecov-image]: https://img.shields.io/codecov/c/github/react-component/footer/master.svg?style=flat-square
15+
[codecov-url]: https://codecov.io/gh/react-component/footer/branch/master
16+
[david-image]: https://david-dm.org/react-component/footer/status.svg?style=flat-square
17+
[david-dev-url]: https://david-dm.org/react-component/footer?type=dev
18+
[david-dev-image]: https://david-dm.org/react-component/footer/dev-status.svg?style=flat-square
19+
[david-url]: https://david-dm.org/react-component/footer
20+
[download-image]: https://img.shields.io/npm/dm/rc-footer.svg?style=flat-square
21+
[download-url]: https://npmjs.org/package/rc-footer
22+
23+
Pretty Footer react component used in [ant.design](https://ant.design).
24+
25+
![](https://gw.alipayobjects.com/zos/antfincdn/z4ie3X8x6u/1cb23945-ec67-45a3-b521-f8da62e12255.png)
26+
27+
## Live Demo
28+
29+
https://react-component.github.io/footer/
30+
31+
## Install
32+
33+
[![rc-footer](https://nodei.co/npm/rc-footer.png)](https://npmjs.org/package/rc-footer)
34+
35+
## Usage
36+
37+
```js
38+
import Footer from 'rc-footer';
39+
import 'rc-footer/assets/index.css'; // import 'rc-footer/asssets/index.less';
40+
import { render } from 'react-dom';
41+
42+
render(
43+
<Footer
44+
columns={[
45+
{
46+
icon: (
47+
<img src="https://gw.alipayobjects.com/zos/rmsportal/XuVpGqBFxXplzvLjJBZB.svg" />
48+
),
49+
title: '语雀',
50+
url: 'https://yuque.com',
51+
description: '知识创作与分享工具',
52+
openExternal: true,
53+
},
54+
]}
55+
bottom="Made with ❤️ by AFX"
56+
/>,
57+
mountNode,
58+
);
59+
```
60+
61+
## API
62+
63+
| Property | Type | Default | Description |
64+
| ---------------- | --------------------------------- | -------------- | ---------------------------------------- |
65+
| prefixCls | string | rc-footer | |
66+
| className | string | '' | additional class name of footer |
67+
| style | React.CSSProperties | | style properties of footer |
68+
| columns | [Column](#Column) Array | [] | columns data inside footer |
69+
| bottom | ReactNode | | extra bottom area beneath footer columns |
70+
| theme | 'light' \| 'dark' | 'dark' | preset theme of footer |
71+
| backgroundColor | string | '#000' | background color of footer |
72+
| columnLayout | 'space-around' or 'space-between' | 'space-around' | justify-content value of columns element |
73+
| maxColumnsPerRow | number | - | max count of columns for each row |
74+
75+
### Column
76+
77+
| Property | Type | Default | Description |
78+
| --------- | -------------------------- | ------- | ------------------------------- |
79+
| icon | ReactNode | | icon that before column title |
80+
| title | ReactNode | | title of column |
81+
| items | [Item](#Column-Item) Array | [] | items data inside each column |
82+
| className | string | '' | additional class name of footer |
83+
| style | React.CSSProperties | | style properties of footer |
84+
85+
### Column Item
86+
87+
| Property | Type | Default | Description |
88+
| ------------- | ------------------- | ------- | ------------------------------------------------------- |
89+
| icon | ReactNode | | icon that before column title |
90+
| title | ReactNode | | title of column |
91+
| description | ReactNode | | description of column, come after title |
92+
| url | string | | link url of item title |
93+
| openExternal | boolean | false | link target would be `_blank` if `openExternal` is ture |
94+
| className | string | '' | additional class name of footer |
95+
| style | React.CSSProperties | | style properties of footer |
96+
| LinkComponent | React.ReactType | 'a' | the link element to render item |
97+
98+
## Development
99+
100+
```
101+
npm install
102+
npm start
103+
```
104+
105+
## License
106+
107+
rc-footer is released under the MIT license.

0 commit comments

Comments
 (0)