UNPKG

ffr-components

Version:

Fiori styled UI components

55 lines (45 loc) 1.85 kB
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck"; import _createClass from "@babel/runtime/helpers/esm/createClass"; import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn"; import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf"; import _inherits from "@babel/runtime/helpers/esm/inherits"; import React from 'react'; import Button from '../button'; import "./style.css"; import "../theme/theme.css"; var CircleButton = /*#__PURE__*/ function (_React$Component) { _inherits(CircleButton, _React$Component); function CircleButton(props) { var _this; _classCallCheck(this, CircleButton); _this = _possibleConstructorReturn(this, _getPrototypeOf(CircleButton).call(this, props)); _this.focus = function () { _this.innerDomRef.current.focus(); }; _this.innerDomRef = React.createRef(); return _this; } _createClass(CircleButton, [{ key: "render", value: function render() { var _this$props = this.props, _this$props$className = _this$props.className, className = _this$props$className === void 0 ? '' : _this$props$className, _this$props$option = _this$props.option, option = _this$props$option === void 0 ? 'emphasized' : _this$props$option, rest = _objectWithoutProperties(_this$props, ["className", "option"]); return React.createElement(Button, _extends({ glyph: "add", className: "circle-button ".concat(className), option: option, innerDomRef: this.innerDomRef }, rest)); } }]); return CircleButton; }(React.Component); export default CircleButton;