0.6.8 • Published 1 year ago

rc-footer v0.6.8

Weekly downloads
6,974
License
MIT
Repository
github
Last release
1 year ago

rc-footer 🐾

NPM version npm download dumi build status Codecov Dependencies DevDependencies bundle size

Pretty Footer react component used in ant.design and antv.vision.

npm.io

Live Demo

https://react-component.github.io/footer/

Install

rc-footer

Usage

import Footer from 'rc-footer';
import 'rc-footer/assets/index.css'; // import 'rc-footer/asssets/index.less';
import { render } from 'react-dom';

render(
  <Footer
    columns={[
      {
        icon: (
          <img src="https://gw.alipayobjects.com/zos/rmsportal/XuVpGqBFxXplzvLjJBZB.svg" />
        ),
        title: '语雀',
        url: 'https://yuque.com',
        description: '知识创作与分享工具',
        openExternal: true,
      },
    ]}
    bottom="Made with ❤️ by AFX"
  />,
  mountNode,
);

API

PropertyTypeDefaultDescription
prefixClsstringrc-footer
classNamestring''additional class name of footer
styleReact.CSSPropertiesstyle properties of footer
columnsColumn Array[]columns data inside footer
bottomReactNodeextra bottom area beneath footer columns
theme'light' | 'dark''dark'preset theme of footer
backgroundColorstring'#000'background color of footer
columnLayout'space-around' | 'space-between''space-around'justify-content value of columns element
maxColumnsPerRownumber-max count of columns for each row

Column

PropertyTypeDefaultDescription
iconReactNodeicon that before column title
titleReactNodetitle of column
itemsItem Array[]items data inside each column
classNamestring''additional class name of footer
styleReact.CSSPropertiesstyle properties of footer

Column Item

PropertyTypeDefaultDescription
iconReactNodeicon that before column title
titleReactNodetitle of column
descriptionReactNodedescription of column, come after title
urlstringlink url of item title
openExternalbooleanfalselink target would be _blank if openExternal is ture
classNamestring''additional class name of footer
styleReact.CSSPropertiesstyle properties of footer
LinkComponentReact.ReactType'a'the link element to render item

Development

npm install
npm start

License

rc-footer is released under the MIT license.