UNPKG

@zohodesk/components

Version:

In this Package, we Provide Some Basic Components to Build Web App

63 lines (55 loc) 1.88 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = Button; var _react = _interopRequireDefault(require("react")); var _defaultProps = require("./props/defaultProps"); var _propTypes = require("./props/propTypes"); var _semanticButtonModule = _interopRequireDefault(require("../../../semantic/Button/semanticButton.module.css")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function Button(props) { var value = props.value, type = props.type, text = props.text, title = props.title, name = props.name, autoFocus = props.autoFocus, disabled = props.disabled, ref = props.ref, dataId = props.dataId, onClick = props.onClick, children = props.children, customClass = props.customClass, a11y = props.a11y; var ariaLabel = a11y.ariaLabel, ariaHaspopup = a11y.ariaHaspopup, ariaExpanded = a11y.ariaExpanded, ariaControls = a11y.ariaControls, ariaLabelledby = a11y.ariaLabelledby; return /*#__PURE__*/_react["default"].createElement("button", { className: "".concat(_semanticButtonModule["default"].buttonReset, " ").concat(customClass), "aria-label": ariaLabel, "aria-haspopup": ariaHaspopup, "aria-expanded": ariaExpanded, "aria-controls": ariaControls, "aria-labelledby": ariaLabelledby, type: type, value: value, name: name, autoFocus: autoFocus, disabled: disabled, ref: ref, "data-id": dataId, "data-test-id": dataId, onClick: onClick, "data-title": title }, children ? children : text); } Button.defaultProps = _defaultProps.defaultProps; Button.propTypes = _propTypes.propTypes; // if (__DOCS__) { // Button.docs = { // componentGroup: 'semantic', // folderName: 'DefaultComponents' // }; // }