UNPKG

@progress/kendo-react-layout

Version:

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

9 lines (8 loc) 1.85 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react"),c=require("prop-types"),o=require("@progress/kendo-react-common");function m(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const a=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(n,i,a.get?a:{enumerable:!0,get:()=>e[i]})}}return n.default=e,Object.freeze(n)}const t=m(s),l=e=>{const n=t.useRef(null),i=t.useCallback(a=>{e.onClick&&e.onClick.call(void 0,{syntheticEvent:a,item:e.item,title:e.title})},[e.item,e.title,e.onClick]);return t.useEffect(()=>{n.current&&e.focused&&n.current.focus()},[e.focused]),t.createElement("span",{style:e.style,tabIndex:e.tabIndex,className:o.classNames("k-actionsheet-item","k-cursor-pointer",e.disabled&&"k-disabled",e.className),ref:n,role:"button","aria-disabled":e.disabled,onClick:i},t.createElement("span",{className:"k-actionsheet-action"},e.icon&&t.createElement("span",{className:"k-icon-wrap"},e.icon),(e.title||e.description)&&t.createElement("span",{className:"k-actionsheet-item-text"},e.title&&t.createElement("span",{className:"k-actionsheet-item-title"},e.title),e.description&&t.createElement("span",{className:"k-actionsheet-item-description"},e.description))))};l.propTypes={className:c.string,style:c.object,description:c.string,disabled:c.bool,group:c.oneOf(["top","bottom"]),icon:c.element,title:c.string};exports.ActionSheetItem=l;