Repository URL to install this package:
|
Version:
0.0.15 ▾
|
import * as tslib_1 from "tslib";
import React from 'react';
import { Modal } from '@skava/packages/ui';
import { observer } from 'xmobx/mobx-react';
import { ModalWrapper, StyledQuestion, StyledDescription, ButtonWrapper, StyledModal, StyledRejectButton, StyledConfirmButton, } from './styled';
import { privacyContainer } from './privacyContainer';
const { popupModalText } = privacyContainer.privacyState;
let PrivacyModal = class PrivacyModal extends React.Component {
constructor() {
super(...arguments);
this.renderButtonWrapper = () => {
return (React.createElement(ButtonWrapper, null,
React.createElement(StyledRejectButton, { onClick: privacyContainer.handleReject }),
React.createElement(StyledConfirmButton, { onClick: privacyContainer.handleConfirm })));
};
this.renderQuestionWithDescription = () => {
return (React.createElement(React.Fragment, null,
React.createElement(StyledQuestion, null, popupModalText.text),
React.createElement(StyledDescription, null, popupModalText.description)));
};
}
render() {
const state = { isVisible: true };
return (React.createElement(Modal.ModalContext, { state: state },
React.createElement(StyledModal, null,
React.createElement(ModalWrapper, null,
this.renderQuestionWithDescription(),
this.renderButtonWrapper()))));
}
};
PrivacyModal.defaultProps = {
// @todo maybe this won't update, access in render instead of needed
// popupModalText: privacyContainer.privacyState.popupModalText,
// these 2 never change
popupModalText: {
text: undefined,
description: undefined,
},
};
PrivacyModal = tslib_1.__decorate([
observer
], PrivacyModal);
export { PrivacyModal };
//# sourceMappingURL=PrivacyModal.js.map