UNPKG

@progress/kendo-react-layout

Version:

React Layout components enable you to create a perceptive and intuitive layout of web projects. KendoReact Layout package

41 lines (40 loc) 1.24 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import * as e from "react"; import t from "prop-types"; import { classNames as r } from "@progress/kendo-react-common"; const s = class s extends e.Component { /** * @hidden */ render() { return this.props.url ? /* @__PURE__ */ e.createElement("a", { className: this.getMenuItemClassName(), role: "presentation", href: this.props.url, tabIndex: -1 }, this.props.children) : /* @__PURE__ */ e.createElement( "span", { id: this.props.id, className: r(this.getMenuItemClassName(), this.props.className), style: this.props.style, role: "presentation" }, this.props.children ); } getMenuItemClassName() { return r("k-link", "k-menu-link", { "k-active": this.props.opened }); } }; s.propTypes = { opened: t.bool, url: t.string }; let p = s; export { p as MenuItemLink };