Dashboard sipadu mbip
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

NavItem.js 1020B

12345678910111213141516171819202122
  1. import _extends from "@babel/runtime/helpers/esm/extends";
  2. import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
  3. import classNames from 'classnames';
  4. import React from 'react';
  5. import { useBootstrapPrefix } from './ThemeProvider';
  6. var NavItem = React.forwardRef( // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
  7. function (_ref, ref) {
  8. var bsPrefix = _ref.bsPrefix,
  9. className = _ref.className,
  10. children = _ref.children,
  11. _ref$as = _ref.as,
  12. Component = _ref$as === void 0 ? 'div' : _ref$as,
  13. props = _objectWithoutPropertiesLoose(_ref, ["bsPrefix", "className", "children", "as"]);
  14. bsPrefix = useBootstrapPrefix(bsPrefix, 'nav-item');
  15. return React.createElement(Component, _extends({}, props, {
  16. ref: ref,
  17. className: classNames(className, bsPrefix)
  18. }), children);
  19. });
  20. NavItem.displayName = 'NavItem';
  21. export default NavItem;