box-ui-elements-mlh
Version:
33 lines (30 loc) • 1.76 kB
JavaScript
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
/**
*
* @file Open With button when multiple integrations are present
* @author Box
*/
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
import MenuToggle from '../../components/dropdown-menu/MenuToggle';
import IconOpenWith from '../../icons/general/IconOpenWith';
import Button from '../../components/button/Button';
import Tooltip from '../common/Tooltip';
import messages from '../common/messages';
import OpenWithButtonContents from './OpenWithButtonContents';
import { CLASS_INTEGRATION_ICON, OPEN_WITH_BUTTON_ICON_SIZE } from '../../constants';
var MultipleIntegrationsOpenWithButton = function MultipleIntegrationsOpenWithButton(buttonProps) {
return /*#__PURE__*/React.createElement(Tooltip, {
position: "middle-left",
text: /*#__PURE__*/React.createElement(FormattedMessage, messages.defaultOpenWithDescription)
}, /*#__PURE__*/React.createElement(Button, _extends({
"data-testid": "multipleintegrationsbutton"
}, buttonProps), /*#__PURE__*/React.createElement(MenuToggle, null, /*#__PURE__*/React.createElement(OpenWithButtonContents, null, /*#__PURE__*/React.createElement(IconOpenWith, {
className: CLASS_INTEGRATION_ICON,
dimension: OPEN_WITH_BUTTON_ICON_SIZE,
height: OPEN_WITH_BUTTON_ICON_SIZE,
width: OPEN_WITH_BUTTON_ICON_SIZE
})))));
};
export default MultipleIntegrationsOpenWithButton;
//# sourceMappingURL=MultipleIntegrationsOpenWithButton.js.map