@progress/kendo-react-buttons
Version:
All you need in React Button in one package: disabled/enabled states, built-in styles and more. KendoReact Buttons package
9 lines (8 loc) • 2.03 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react"),s=require("./ToolbarSeparator.js"),v=require("./ToolbarScrollButton.js");function T(r){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(o,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return o.default=r,Object.freeze(o)}const e=T(E),B=r=>{const{scrollButtons:o,scrollButtonsPosition:t,isOverflowing:n,scrollContentRef:b,buttonScrollSpeed:m,dir:l,isScrollStartPosition:u,isScrollEndPosition:i,prevButton:p,nextButton:S,children:d}=r,a=(f,g)=>e.createElement(v.ToolbarScrollButton,{type:f,disabled:g,scrollContentRef:b,buttonScrollSpeed:m,prevButton:p,nextButton:S}),c=o==="visible"||o==="auto"&&n;return e.createElement(e.Fragment,null,c&&t==="split"&&e.createElement(e.Fragment,null,a(l!=="rtl"?"prev":"next",u),e.createElement(s.ToolbarSeparator,{className:"k-toolbar-button-separator"})),c&&t==="start"&&e.createElement(e.Fragment,null,a(l!=="rtl"?"prev":"next",u),a(l!=="rtl"?"next":"prev",i),e.createElement(s.ToolbarSeparator,{className:"k-toolbar-button-separator"})),e.createElement("span",{className:"k-toolbar-items k-toolbar-items-scroll",ref:b},d),c&&t==="split"&&e.createElement(e.Fragment,null,e.createElement(s.ToolbarSeparator,{className:"k-toolbar-button-separator"}),a(l!=="rtl"?"next":"prev",i)),c&&t==="end"&&e.createElement(e.Fragment,null,e.createElement(s.ToolbarSeparator,{className:"k-toolbar-button-separator"}),a(l!=="rtl"?"prev":"next",u),a(l!=="rtl"?"next":"prev",i)))};exports.ToolbarScrollable=B;