├── .dumirc.ts ├── .editorconfig ├── .eslintrc.js ├── .fatherrc.ts ├── .github ├── dependabot.yml └── workflows │ └── test.yml ├── .gitignore ├── .husky └── pre-commit ├── .npmignore ├── .prettierignore ├── .prettierrc ├── CHANGELOG.md ├── LICENSE.md ├── README.md ├── assets └── index.less ├── docs ├── changelog.md ├── demo │ ├── rows.md │ ├── simple.md │ └── theme.md ├── examples │ ├── rows.tsx │ ├── simple.tsx │ └── theme.tsx └── index.md ├── index.js ├── jest.config.ts ├── package.json ├── pnpm-lock.yaml ├── script └── update-content.js ├── src ├── column.tsx └── index.tsx ├── tests ├── __snapshots__ │ └── index.test.tsx.snap ├── index.test.tsx └── setupFilesAfterEnv.ts ├── tsconfig.json └── type.d.ts /.dumirc.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'dumi'; 2 | 3 | const basePath = process.env.GH_PAGES ? '/footer/' : '/'; 4 | const publicPath = process.env.GH_PAGES ? '/footer/' : '/'; 5 | 6 | export default defineConfig({ 7 | favicons: ['https://avatars0.githubusercontent.com/u/9441414?s=200&v=4'], 8 | themeConfig: { 9 | name: 'Footer', 10 | logo: 'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4', 11 | }, 12 | outputPath: '.doc', 13 | exportStatic: {}, 14 | base: basePath, 15 | publicPath, 16 | }); 17 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | 15 | [Makefile] 16 | indent_style = tab -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 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 | }; 14 | -------------------------------------------------------------------------------- /.fatherrc.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'father'; 2 | 3 | export default defineConfig({ 4 | plugins: ['@rc-component/father-plugin'], 5 | }); 6 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: npm 4 | directory: "/" 5 | schedule: 6 | interval: daily 7 | time: "21:00" 8 | open-pull-requests-limit: 10 9 | ignore: 10 | - dependency-name: husky 11 | versions: 12 | - 5.0.9 13 | - 5.1.1 14 | - 5.1.2 15 | - 5.1.3 16 | - 5.2.0 17 | - dependency-name: "@types/react-dom" 18 | versions: 19 | - 17.0.0 20 | - 17.0.1 21 | - 17.0.2 22 | - dependency-name: "@types/react" 23 | versions: 24 | - 17.0.0 25 | - 17.0.1 26 | - 17.0.2 27 | - 17.0.3 28 | - dependency-name: react-dom 29 | versions: 30 | - 17.0.1 31 | - dependency-name: less 32 | versions: 33 | - 4.1.0 34 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: ✅ test 2 | on: [push, pull_request] 3 | jobs: 4 | CI: 5 | uses: react-component/rc-test/.github/workflows/test.yml@main 6 | secrets: inherit 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | *.log 3 | .idea/ 4 | .ipr 5 | .iws 6 | *~ 7 | ~* 8 | *.diff 9 | *.patch 10 | *.bak 11 | .DS_Store 12 | Thumbs.db 13 | .project 14 | .*proj 15 | .svn/ 16 | *.swp 17 | *.swo 18 | *.pyc 19 | *.pyo 20 | .build 21 | node_modules 22 | .cache 23 | assets/**/*.css 24 | build 25 | lib 26 | es 27 | yarn.lock 28 | package-lock.json 29 | coverage/ 30 | .doc 31 | 32 | # dumi 33 | .dumi/tmp 34 | .dumi/tmp-test 35 | .dumi/tmp-production 36 | .env.local 37 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | npx pretty-quick --staged 5 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 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: -------------------------------------------------------------------------------- 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 13 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "endOfLine": "lf", 3 | "semi": true, 4 | "singleQuote": true, 5 | "tabWidth": 2, 6 | "trailingComma": "all" 7 | } 8 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## 0.6.0 4 | 5 | - support `maxColumnsPerRow`. 6 | 7 | ## 0.5.0 8 | 9 | - support `theme="dark|light"`. 10 | 11 | ## 0.4.0 12 | 13 | - support `columnLayout`. 14 | - support `backgroundColor`. 15 | 16 | ## 0.3.0 17 | 18 | - support `style` and `className` for footer column and footer item. 19 | - support `LinkComponent` for footer item. 20 | 21 | ## 0.2.0 22 | 23 | - Fix `lib` and `es` folders missing. 24 | 25 | ## 0.1.0 26 | 27 | - First release. 28 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 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. 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # rc-footer 🐾 2 | 3 | [![NPM version][npm-image]][npm-url] 4 | [![npm download][download-image]][download-url] 5 | [![build status][github-actions-image]][github-actions-url] 6 | [![Codecov][codecov-image]][codecov-url] 7 | [![bundle size][bundlephobia-image]][bundlephobia-url] 8 | [![dumi][dumi-image]][dumi-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 | [github-actions-image]: https://github.com/react-component/footer/actions/workflows/main.yml/badge.svg 13 | [github-actions-url]: https://github.com/react-component/footer/actions/workflows/main.yml 14 | [codecov-image]: https://img.shields.io/codecov/c/github/react-component/footer/main.svg?style=flat-square 15 | [codecov-url]: https://codecov.io/gh/react-component/footer/ 16 | [david-url]: https://david-dm.org/react-component/footer 17 | [david-image]: https://david-dm.org/react-component/footer/status.svg?style=flat-square 18 | [david-dev-url]: https://david-dm.org/react-component/footer?type=dev 19 | [david-dev-image]: https://david-dm.org/react-component/footer/dev-status.svg?style=flat-square 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 | [bundlephobia-url]: https://bundlephobia.com/result?p=rc-footer 23 | [bundlephobia-image]: https://badgen.net/bundlephobia/minzip/rc-footer 24 | [dumi-url]: https://github.com/umijs/dumi 25 | [dumi-image]: https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square 26 | 27 | Pretty Footer react component used in [ant.design](https://ant.design) and [antv.vision](https://antv.vision). 28 | 29 | ![](https://gw.alipayobjects.com/zos/antfincdn/z4ie3X8x6u/1cb23945-ec67-45a3-b521-f8da62e12255.png) 30 | 31 | ## Live Demo 32 | 33 | https://react-component.github.io/footer/ 34 | 35 | ## Install 36 | 37 | [![rc-footer](https://nodei.co/npm/rc-footer.png)](https://npmjs.org/package/rc-footer) 38 | 39 | ## Usage 40 | 41 | ```js 42 | import Footer from 'rc-footer'; 43 | import 'rc-footer/assets/index.css'; // import 'rc-footer/asssets/index.less'; 44 | import { render } from 'react-dom'; 45 | 46 | render( 47 |