@carbon/react
Version:
React components for the Carbon Design System
37 lines (35 loc) • 1.1 kB
JavaScript
/**
* Copyright IBM Corp. 2016, 2026
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import { usePrefix } from "../../internal/usePrefix.js";
import classNames from "classnames";
import "react";
import PropTypes from "prop-types";
import { jsx } from "react/jsx-runtime";
//#region src/components/UIShell/HeaderSideNavItems.tsx
/**
* 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.
*/
function HeaderSideNavItems({ className: customClassName, children, hasDivider = false }) {
const prefix = usePrefix();
return /* @__PURE__ */ jsx("ul", {
className: classNames({
[`${prefix}--side-nav__header-navigation`]: true,
[`${prefix}--side-nav__header-divider`]: hasDivider
}, customClassName),
children
});
}
HeaderSideNavItems.propTypes = {
children: PropTypes.node,
className: PropTypes.string,
hasDivider: PropTypes.bool
};
//#endregion
export { HeaderSideNavItems as default };