芝麻web文件管理V1.00
编辑当前文件:/home/freeclou/app.optimyar.com/backend/node_modules/@buffetjs/core/src/components/NavTabs/index.js
/** * * NavTabs * */ import React from 'react'; import { NavLink } from 'react-router-dom'; import PropTypes from 'prop-types'; import { Tab as StyledTab, colors } from '@buffetjs/styles'; import { gradient } from '@buffetjs/utils'; function NavTabs({ links }) { let color = colors.greyLink; return (
{links.map((link, index) => { color = gradient(color, 1.5); const content = link.label ?
{link.label}
: link.compo || null; return (
{content}
); })}
); } NavTabs.defaultProps = { links: [], }; NavTabs.propTypes = { links: PropTypes.arrayOf( PropTypes.shape({ compo: PropTypes.node, label: PropTypes.string, to: PropTypes.string, }) ), }; export default NavTabs;