UNPKG

oadp-material

Version:
44 lines 1.63 kB
import _Button from "@alifd/next/es/button"; import _extends from "@babel/runtime/helpers/extends"; import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose"; import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose"; var _excluded = ["name", "id", "label", "field", "type", "size", "disabled", "text", "onClick", "style", "__designMode"]; import * as React from 'react'; import "./index.scss"; export var OadpButton = /*#__PURE__*/function (_React$Component) { function OadpButton(props) { return _React$Component.call(this, props) || this; } _inheritsLoose(OadpButton, _React$Component); var _proto = OadpButton.prototype; _proto.render = function render() { var _this$props = this.props, name = _this$props.name, id = _this$props.id, label = _this$props.label, field = _this$props.field, type = _this$props.type, size = _this$props.size, disabled = _this$props.disabled, text = _this$props.text, onClick = _this$props.onClick, style = _this$props.style, __designMode = _this$props.__designMode, otherProps = _objectWithoutPropertiesLoose(_this$props, _excluded); if (__designMode === 'design') { onClick = function onClick(e) { console.log('design mode oadp-button click'); }; } return /*#__PURE__*/React.createElement(_Button, _extends({ type: type, size: size, disabled: disabled, text: text, style: style, onClick: onClick }, otherProps), label); }; return OadpButton; }(React.Component); export default OadpButton;