@carbon/react
Version:
React components for the Carbon Design System
42 lines (40 loc) • 1.31 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 { AriaLabelPropType } from "../../prop-types/AriaPropTypes.js";
import classNames from "classnames";
import "react";
import PropTypes from "prop-types";
import { jsx } from "react/jsx-runtime";
//#region src/components/UIShell/HeaderNavigation.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 HeaderNavigation({ "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, children, className: customClassName, ...rest }) {
const prefix = usePrefix();
const className = classNames(`${prefix}--header__nav`, customClassName);
return /* @__PURE__ */ jsx("nav", {
...rest,
"aria-label": ariaLabel,
"aria-labelledby": ariaLabelledBy,
className,
children: /* @__PURE__ */ jsx("ul", {
className: `${prefix}--header__menu-bar`,
children
})
});
}
HeaderNavigation.propTypes = {
...AriaLabelPropType,
children: PropTypes.node,
className: PropTypes.string
};
//#endregion
export { HeaderNavigation as default };