mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-25 09:55:15 +00:00
34 lines
1.3 KiB
JavaScript
34 lines
1.3 KiB
JavaScript
|
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;
|