@atlaskit/inline-edit
Version:
An inline edit displays a custom input component that switches between reading and editing on the same page.
51 lines (50 loc) • 2.19 kB
JavaScript
/* buttons.tsx generated by @compiled/babel-plugin v3.0.2 */
import _extends from "@babel/runtime/helpers/extends";
import "./buttons.compiled.css";
import * as React from 'react';
import { ax, ix } from "@compiled/react/runtime";
/* eslint-disable @atlaskit/design-system/no-nested-styles */
/* eslint-disable @atlaskit/ui-styling-standard/no-nested-selectors */
import IconButton from '@atlaskit/button/icon/button';
import CheckMarkIcon from '@atlaskit/icon/core/check-mark';
import CrossIcon from '@atlaskit/icon/core/cross';
var buttonsContainerStyles = null;
var buttonWrapperBaseStyles = null;
var Buttons = function Buttons(_ref) {
var confirmButtonLabel = _ref.confirmButtonLabel,
cancelButtonLabel = _ref.cancelButtonLabel,
onMouseDown = _ref.onMouseDown,
onCancelClick = _ref.onCancelClick,
testId = _ref.testId;
return /*#__PURE__*/React.createElement("div", {
className: ax(["_1e0c1txw _kqswstnw _1o9zidpf _152t1osq _rjxpidpf _1pfh12x7"])
}, /*#__PURE__*/React.createElement("div", {
tabIndex: -1,
className: ax(["_2rko1qi0 _11c8fhey _vchhusvi _1bsbxy5q _1pby1kze _bfhk1bhr _16qs130s _1mpy1b66 _1nlx1bhr _l2uv6o2t _7mfvm8nx _szlbi7uo"])
}, /*#__PURE__*/React.createElement(IconButton, {
type: "submit",
icon: function icon(iconProps) {
return /*#__PURE__*/React.createElement(CheckMarkIcon, _extends({}, iconProps, {
size: "small"
}));
},
onMouseDown: onMouseDown,
label: confirmButtonLabel,
testId: testId && "".concat(testId, "--confirm")
})), /*#__PURE__*/React.createElement("div", {
tabIndex: -1,
className: ax(["_2rko1qi0 _11c8fhey _vchhusvi _1bsbxy5q _1pby1kze _bfhk1bhr _16qs130s _1mpy1b66 _1nlx1bhr _l2uv6o2t _7mfvm8nx _szlbi7uo"])
}, /*#__PURE__*/React.createElement(IconButton, {
icon: function icon(iconProps) {
return /*#__PURE__*/React.createElement(CrossIcon, _extends({}, iconProps, {
size: "small"
}));
},
label: cancelButtonLabel,
onClick: onCancelClick,
onMouseDown: onMouseDown,
testId: testId && "".concat(testId, "--cancel")
})));
};
// eslint-disable-next-line @repo/internal/react/require-jsdoc
export default Buttons;