@carbon/ibm-products
Version:
Carbon for IBM Products
33 lines (31 loc) • 1.15 kB
JavaScript
/**
* Copyright IBM Corp. 2020, 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.
*/
const require_runtime = require("../../_virtual/_rolldown/runtime.js");
let react = require("react");
react = require_runtime.__toESM(react);
let prop_types = require("prop-types");
prop_types = require_runtime.__toESM(prop_types);
//#region src/components/Nav/NavItemLink.jsx
/**
* Copyright IBM Corp. 2024
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
const NavItemLink = react.default.forwardRef(function NavItemLink(props, ref) {
const { element = "a", ...rest } = props;
return react.default.createElement(element, {
...rest,
ref
});
});
NavItemLink.displayName = "NavItemLink";
NavItemLink.propTypes = {
/** @type {elementType} The base element to use to build the link. Defaults to `a`, can also accept alternative tag names or custom components like `Link` from `react-router`. */
element: prop_types.default.elementType };
//#endregion
exports.default = NavItemLink;