@carbon/react
Version:
React components for the Carbon Design System
38 lines (32 loc) • 1.06 kB
JavaScript
/**
* Copyright IBM Corp. 2016, 2023
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
;
Object.defineProperty(exports, '__esModule', { value: true });
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
var React = require('react');
var cx = require('classnames');
var PropTypes = require('prop-types');
var usePrefix = require('../../internal/usePrefix.js');
const SwitcherDivider = ({
className: customClassName,
...other
}) => {
const prefix = usePrefix.usePrefix();
const classNames = cx(`${prefix}--switcher__item--divider`, {
[customClassName || '']: !!customClassName
});
return /*#__PURE__*/React.createElement("hr", _rollupPluginBabelHelpers.extends({}, other, {
className: classNames
}));
};
SwitcherDivider.propTypes = {
/**
* Optionally provide a custom class to apply to the underlying `<li>` node
*/
className: PropTypes.string
};
exports.default = SwitcherDivider;