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".

43 lines 1.14 kB
import _defineProperty from "@babel/runtime/helpers/defineProperty"; import React from 'react'; import InlineDialog from '@atlaskit/inline-dialog'; export class StatefulInlineDialog extends React.Component { constructor(...args) { super(...args); _defineProperty(this, "state", { isOpen: false }); _defineProperty(this, "openDialog", () => { this.setState({ isOpen: true }); }); _defineProperty(this, "closeDialog", () => { this.setState({ isOpen: false }); }); _defineProperty(this, "handleMouseOver", () => { this.openDialog(); }); _defineProperty(this, "handleMouseOut", () => { this.closeDialog(); }); } render() { const { children, content, placement } = this.props; return /*#__PURE__*/React.createElement(InlineDialog, { content: content, placement: placement, isOpen: this.state.isOpen }, /*#__PURE__*/React.createElement("span", { onMouseOver: this.handleMouseOver, onMouseOut: this.handleMouseOut }, children)); } } export default StatefulInlineDialog;