UNPKG

@atlaskit/editor-plugin-table

Version:

Table plugin for the @atlaskit/editor

43 lines (42 loc) 1.57 kB
import React from 'react'; import { injectIntl } from 'react-intl'; import { TableCssClassName as ClassName } from '../../types'; const DeleteButton = ({ style, onClick, onMouseEnter, onMouseLeave, removeLabel, intl: { formatMessage } }) => /*#__PURE__*/React.createElement("div", { // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766 className: ClassName.CONTROLS_DELETE_BUTTON_WRAP // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766 , style: style, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onFocus: onMouseEnter, onBlur: onMouseLeave }, /*#__PURE__*/React.createElement("button", { type: "button", "aria-label": formatMessage(removeLabel, { 0: 1 }) // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766 , className: ClassName.CONTROLS_DELETE_BUTTON, onMouseDown: onClick, onMouseMove: e => e.preventDefault() }, /*#__PURE__*/React.createElement("svg", { className: ClassName.CONTROLS_BUTTON_ICON }, /*#__PURE__*/React.createElement("path", { d: "M12.242 10.828L9.414 8l2.828-2.829a.999.999 0 1 0-1.414-1.414L8 6.587l-2.829-2.83a1 1 0 0 0-1.414 1.414l2.83 2.83-2.83 2.827a1 1 0 0 0 1.414 1.414l2.83-2.828 2.827 2.828a.999.999 0 1 0 1.414-1.414", fill: "currentColor", fillRule: "evenodd" })))); // eslint-disable-next-line @typescript-eslint/no-restricted-types const _default_1 = injectIntl(DeleteButton); export default _default_1;