GoScrobble/web/node_modules/react-bootstrap/esm/NavItem.js

23 lines
1.0 KiB
JavaScript
Raw Normal View History

2022-04-25 02:47:15 +00:00
import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
var _excluded = ["bsPrefix", "className", "children", "as"];
import classNames from 'classnames';
import React from 'react';
import { useBootstrapPrefix } from './ThemeProvider';
var NavItem = /*#__PURE__*/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
function (_ref, ref) {
var bsPrefix = _ref.bsPrefix,
className = _ref.className,
children = _ref.children,
_ref$as = _ref.as,
Component = _ref$as === void 0 ? 'div' : _ref$as,
props = _objectWithoutPropertiesLoose(_ref, _excluded);
bsPrefix = useBootstrapPrefix(bsPrefix, 'nav-item');
return /*#__PURE__*/React.createElement(Component, _extends({}, props, {
ref: ref,
className: classNames(className, bsPrefix)
}), children);
});
NavItem.displayName = 'NavItem';
export default NavItem;