UNPKG

dtd

Version:

根据数梦工场视觉规范打造的组件库,感谢react-components和ant design

1 lines 1.07 kB
import _classCallCheck from"babel-runtime/helpers/classCallCheck";import _createClass from"babel-runtime/helpers/createClass";import _possibleConstructorReturn from"babel-runtime/helpers/possibleConstructorReturn";import _inherits from"babel-runtime/helpers/inherits";import*as React from"react";import Button from"../button";function noop(){}var Operation=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"render",value:function(){var e=this.props,t=e.moveToLeft,r=void 0===t?noop:t,o=e.moveToRight,i=void 0===o?noop:o,n=e.leftArrowText,s=void 0===n?"":n,a=e.rightArrowText,l=void 0===a?"":a,c=e.leftActive,p=e.rightActive,m=e.className;return React.createElement("div",{className:m},React.createElement(Button,{type:"primary",size:"mini",disabled:!c,onClick:r,icon:"left"},s),React.createElement(Button,{type:"primary",size:"mini",disabled:!p,onClick:i,icon:"right"},l))}}]),t}(React.Component);export default Operation;