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

34 lines
1.3 KiB
JavaScript
Raw Permalink 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", "listProps", "children", "label", "as"];
import classNames from 'classnames';
import React from 'react';
import { useBootstrapPrefix } from './ThemeProvider';
import BreadcrumbItem from './BreadcrumbItem';
var defaultProps = {
label: 'breadcrumb',
listProps: {}
};
var Breadcrumb = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
var bsPrefix = _ref.bsPrefix,
className = _ref.className,
listProps = _ref.listProps,
children = _ref.children,
label = _ref.label,
_ref$as = _ref.as,
Component = _ref$as === void 0 ? 'nav' : _ref$as,
props = _objectWithoutPropertiesLoose(_ref, _excluded);
var prefix = useBootstrapPrefix(bsPrefix, 'breadcrumb');
return /*#__PURE__*/React.createElement(Component, _extends({
"aria-label": label,
className: className,
ref: ref
}, props), /*#__PURE__*/React.createElement("ol", _extends({}, listProps, {
className: classNames(prefix, listProps == null ? void 0 : listProps.className)
}), children));
});
Breadcrumb.displayName = 'Breadcrumb';
Breadcrumb.defaultProps = defaultProps;
Breadcrumb.Item = BreadcrumbItem;
export default Breadcrumb;