UNPKG

@clayui/button

Version:
26 lines (25 loc) 980 B
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } /** * SPDX-FileCopyrightText: © 2019 Liferay, Inc. <https://liferay.com> * SPDX-License-Identifier: BSD-3-Clause */ import ClayIcon from '@clayui/icon'; import React from 'react'; import ClayButton from "./Button.js"; const ClayButtonWithIcon = /*#__PURE__*/React.forwardRef((_ref, ref) => { let { monospaced = true, spritemap, symbol, ...otherProps } = _ref; return /*#__PURE__*/React.createElement(ClayButton, _extends({}, otherProps, { monospaced: monospaced, ref: ref }), /*#__PURE__*/React.createElement(ClayIcon, { spritemap: spritemap, symbol: symbol })); }); ClayButtonWithIcon.displayName = 'ClayButtonWithIcon'; export default ClayButtonWithIcon;