芝麻web文件管理V1.00
编辑当前文件:/home/freeclou/app.optimyar.com/backend/node_modules/reactstrap/src/Navbar.js
import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import { mapToCssModules, tagPropType } from './utils'; const propTypes = { light: PropTypes.bool, dark: PropTypes.bool, full: PropTypes.bool, fixed: PropTypes.string, sticky: PropTypes.string, color: PropTypes.string, role: PropTypes.string, tag: tagPropType, className: PropTypes.string, cssModule: PropTypes.object, expand: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]), }; const defaultProps = { tag: 'nav', expand: false, }; const getExpandClass = (expand) => { if (expand === false) { return false; } else if (expand === true || expand === 'xs') { return 'navbar-expand'; } return `navbar-expand-${expand}`; }; const Navbar = (props) => { const { expand, className, cssModule, light, dark, fixed, sticky, color, tag: Tag, ...attributes } = props; const classes = mapToCssModules(classNames( className, 'navbar', getExpandClass(expand), { 'navbar-light': light, 'navbar-dark': dark, [`bg-${color}`]: color, [`fixed-${fixed}`]: fixed, [`sticky-${sticky}`]: sticky, } ), cssModule); return (
); }; Navbar.propTypes = propTypes; Navbar.defaultProps = defaultProps; export default Navbar;