@carbon/react
Version:
React components for the Carbon Design System
34 lines (32 loc) • 989 B
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/SideNavLinkText.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 SideNavLinkText({ className: customClassName, children, ...rest }) {
const className = classNames(`${usePrefix()}--side-nav__link-text`, customClassName);
return /* @__PURE__ */ jsx("span", {
...rest,
className,
children
});
}
SideNavLinkText.propTypes = {
children: PropTypes.node.isRequired,
className: PropTypes.string
};
//#endregion
export { SideNavLinkText as default };