index.js 713 Bytes
Newer Older
1 2 3 4 5 6 7 8 9
import React from 'react';
import classNames from 'classnames';
import styles from './index.less';

export default ({ className, links, copyright }) => {
  const clsString = classNames(styles.globalFooter, className);
  return (
    <div className={clsString}>
      {
afc163's avatar
afc163 committed
10 11 12 13
        links && (
          <div className={styles.links}>
            {links.map(link => (
              <a
14
                key={link.key}
afc163's avatar
afc163 committed
15 16 17 18 19 20 21 22
                target={link.blankTarget ? '_blank' : '_self'}
                href={link.href}
              >
                {link.title}
              </a>
            ))}
          </div>
        )
23 24 25 26 27
      }
      {copyright && <div className={styles.copyright}>{copyright}</div>}
    </div>
  );
};