UNPKG

@atlaskit/focused-task-close-account

Version:

This package contains all of the UI components needed to assemble the focused tasks for deactivating and deleting users' accounts in accordance with the GDPR "Right to be forgotten".

42 lines 2.53 kB
import _classCallCheck from "@babel/runtime/helpers/classCallCheck"; import _createClass from "@babel/runtime/helpers/createClass"; import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn"; import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf"; import _inherits from "@babel/runtime/helpers/inherits"; function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } import React from 'react'; import ButtonGroup from '@atlaskit/button/button-group'; import Button from '@atlaskit/button'; import * as Styled from './styled'; import { FormattedMessage } from 'react-intl-next'; import { footerMessages } from '../../messages'; var Footer = /*#__PURE__*/function (_React$Component) { function Footer() { _classCallCheck(this, Footer); return _callSuper(this, Footer, arguments); } _inherits(Footer, _React$Component); return _createClass(Footer, [{ key: "render", value: function render() { var _this$props = this.props, currentScreenIdx = _this$props.currentScreenIdx, numScreens = _this$props.numScreens, onCancel = _this$props.onCancel, onNext = _this$props.onNext, onPrevious = _this$props.onPrevious, secondaryActions = _this$props.secondaryActions, submitButton = _this$props.submitButton; return /*#__PURE__*/React.createElement(Styled.FooterOuter, null, /*#__PURE__*/React.createElement("div", null, secondaryActions), /*#__PURE__*/React.createElement(ButtonGroup, null, currentScreenIdx < 1 ? /*#__PURE__*/React.createElement(Button, { onClick: onCancel }, /*#__PURE__*/React.createElement(FormattedMessage, footerMessages.cancel)) : /*#__PURE__*/React.createElement(Button, { onClick: onPrevious }, /*#__PURE__*/React.createElement(FormattedMessage, footerMessages.previous)), currentScreenIdx < numScreens - 1 ? /*#__PURE__*/React.createElement(Button, { appearance: "primary", onClick: onNext }, /*#__PURE__*/React.createElement(FormattedMessage, footerMessages.next)) : submitButton)); } }]); }(React.Component); export { Footer as default };