@atlaskit/inline-edit
Version:
An inline edit displays a custom input component that switches between reading and editing on the same page.
46 lines (45 loc) • 1.91 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';
const buttonsContainerStyles = null;
const buttonWrapperBaseStyles = null;
const Buttons = ({
confirmButtonLabel,
cancelButtonLabel,
onMouseDown,
onCancelClick,
testId
}) => /*#__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: iconProps => /*#__PURE__*/React.createElement(CheckMarkIcon, _extends({}, iconProps, {
size: "small"
})),
onMouseDown: onMouseDown,
label: confirmButtonLabel,
testId: testId && `${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: iconProps => /*#__PURE__*/React.createElement(CrossIcon, _extends({}, iconProps, {
size: "small"
})),
label: cancelButtonLabel,
onClick: onCancelClick,
onMouseDown: onMouseDown,
testId: testId && `${testId}--cancel`
})));
// eslint-disable-next-line @repo/internal/react/require-jsdoc
export default Buttons;